[−][src]Struct huawei_modem::HuaweiModem
A connection to an AT/Huawei-style modem.
Methods
impl HuaweiModem
[src]
pub fn new_from_path<P: AsRef<Path>>(path: P, h: &Handle) -> HuaweiResult<Self>
[src]
Start talking to the modem at a specified file path.
pub fn new_from_file(f: File, h: &Handle) -> HuaweiResult<Self>
[src]
Start talking to the modem represented by a given file handle.
The file handle provided must support non-blocking IO for this method to work.
pub fn take_urc_rx(&mut self) -> Option<UnboundedReceiver<AtResponse>>
[src]
Retrieve the URC (Unsolicited Result Code) receiver from the modem (it can only be taken once).
This gives you an UnboundedReceiver
that provides you with a stream of AtResponse
s that
are unsolicited, i.e. they are proactive notifications from the modem of something
happening. On some modems, you may well receive a steady stream of random updates.
This can be useful when you configure your modem for message notification on delivery (see
cmd::sms::set_new_message_indications
), in which case you'll want to check for CNMI
URCs through this receiver and use that to poll for new messages.
pub fn send_raw(&mut self, cmd: AtCommand) -> ModemResponseFuture
[src]
Send a raw AT command to the modem.
Auto Trait Implementations
impl Send for HuaweiModem
impl Sync for HuaweiModem
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,