Skip to main content

Client

Struct Client 

pub struct Client {
    qmi: Client<Wms>,
}
Expand description

Client of the WMS service.

Its Connection must run for requests to complete. Cloning the client is cheap. Dropping every clone stops the connection.

Fields§

§qmi: Client<Wms>

Implementations§

§

impl Client

pub const fn builder() -> ClientBuilder<Wms, Self>

Returns a builder for the client, for example to change the request timeout.

pub fn delete(&self, request: &Delete) -> RequestBuilder<'_, ()>

Deletes stored messages. Sends Delete.

pub fn events(&self) -> Result<Indications<EventReport>, Error>

Subscribes to event reports.

Only reports received after this call are delivered. Subscribe before you enable the reports with set_event_report, otherwise the first ones are lost.

§Errors

Returns ql_qmi::Error::Disconnected if the connection has stopped.

pub fn list_messages( &self, request: &ListMessages, ) -> RequestBuilder<'_, MessageList>

Lists stored messages. Sends ListMessages.

pub const fn qmi(&self) -> &Client<Wms>

Returns the typed QMI client, for example to send a custom request.

pub fn raw_read(&self, request: &RawRead) -> RequestBuilder<'_, RawMessage>

Reads a stored message. Sends RawRead.

pub fn routes(&self) -> RequestBuilder<'_, Routes>

Reads the routing table. Sends GetRoutes.

pub fn send_ack(&self, request: &SendAck) -> RequestBuilder<'_, ()>

Acknowledges a transferred message to the network. Sends SendAck.

pub fn set_event_report( &self, request: &SetEventReport, ) -> RequestBuilder<'_, ()>

Sets which event reports the modem sends to this client. Sends SetEventReport.

pub fn set_routes(&self, request: &SetRoutes<'_>) -> RequestBuilder<'_, ()>

Writes the routing table. Sends SetRoutes.

Trait Implementations§

§

impl Clone for Client

§

fn clone(&self) -> Client

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Client

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl From<Client<Wms>> for Client

§

fn from(qmi: Client<Wms>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more