[][src]Struct huawei_modem::HuaweiModem

pub struct HuaweiModem { /* fields omitted */ }

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 AtResponses 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]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T