Skip to main content

Client

Struct Client 

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

Client of the NAS service.

Its Connection must run for requests to complete. Cloning the client is cheap. Clones share the connection and its indication registration. Dropping every clone stops the connection. The IDL says that the modem keeps the indication registration of each client separately.

Fields§

§qmi: Client<Nas>

Implementations§

§

impl Client

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

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

pub fn cell_location_info(&self) -> RequestBuilder<'_, CellLocationInfo>

Reads the serving and neighbor cells. Sends GetCellLocationInfo.

pub fn config_sig_info2( &self, request: &ConfigSigInfo2<'_>, ) -> RequestBuilder<'_, ()>

Sets when the modem sends signal strength indications. Sends ConfigSigInfo2.

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

Subscribes to indications.

Only indications received after this call are delivered. Subscribe before you enable them with indication_register, otherwise the first ones are lost.

§Errors

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

pub fn indication_register( &self, request: &IndicationRegister, ) -> RequestBuilder<'_, ()>

Sets which indications the modem sends to this client. Sends IndicationRegister.

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

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

pub fn set_sys_info_ind_reporting_limit( &self, limit: SysInfoLimit, ) -> RequestBuilder<'_, ()>

Limits the indications of system information to some changes. An empty mask removes the limit. Sends SetSysInfoIndReportingLimit.

pub fn set_system_selection_preference( &self, request: &SetSystemSelectionPreference<'_>, ) -> RequestBuilder<'_, ()>

Sets the system selection preference. Sends SetSystemSelectionPreference.

pub fn sig_info(&self) -> RequestBuilder<'_, SignalInfo>

Reads the signal strength. Sends GetSigInfo.

pub fn sys_info(&self) -> RequestBuilder<'_, SysInfo>

Reads the system information. Sends GetSysInfo.

pub fn sys_info_ind_reporting_limit( &self, ) -> RequestBuilder<'_, SysInfoIndReportingLimit>

Reads the limit of system information indications. Sends GetSysInfoIndReportingLimit.

pub fn system_selection_preference( &self, ) -> RequestBuilder<'_, SystemSelectionPreference>

Reads the system selection preference. Sends GetSystemSelectionPreference.

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<Nas>> for Client

§

fn from(qmi: Client<Nas>) -> 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