pub struct Control<'a> { /* private fields */ }Expand description
Provides a higher level API for controlling a given context.
Implementations§
Source§impl<'a> Control<'a>
impl<'a> Control<'a>
Sourcepub async fn new(control: Control<'a>, cid: u8) -> Self
pub async fn new(control: Control<'a>, cid: u8) -> Self
Create a new instance of a control handle for a given context.
Will wait for the modem to be initialized if not.
Sourcepub async fn at_command(&self, req: &[u8], resp: &mut [u8]) -> usize
pub async fn at_command(&self, req: &[u8], resp: &mut [u8]) -> usize
Perform a raw AT command
Sourcepub async fn configure(&self, config: &Config<'_>) -> Result<(), Error>
pub async fn configure(&self, config: &Config<'_>) -> Result<(), Error>
Configures the modem with the provided config.
NOTE: This will disconnect the modem from any current APN and should not be called if the configuration has not been changed.
After configuring, invoke [enable()] to activate the configuration.
Auto Trait Implementations§
impl<'a> Freeze for Control<'a>
impl<'a> !RefUnwindSafe for Control<'a>
impl<'a> !Send for Control<'a>
impl<'a> !Sync for Control<'a>
impl<'a> Unpin for Control<'a>
impl<'a> !UnwindSafe for Control<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more