Skip to main content

Client

Struct Client 

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

Client of the WDS service.

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

On EVA and EVD, the modem ends a data call when the client that started it disconnects. Keep the client alive while the call is up.

Fields§

§qmi: Client<Wds>

Implementations§

§

impl Client

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

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

pub fn bind_mux_data_port( &self, endpoint: EndpointId, mux_id: MuxId, ) -> RequestBuilder<'_, ()>

Binds the client to a data port. Sends BindMuxDataPort.

For rmnet_dataN, pass EndpointId::BAM_DMUX and the mux ID from RmnetIndex::mux_id.

pub fn create_profile( &self, settings: &Profile, ) -> RequestBuilder<'_, CreatedProfile>

Creates a 3GPP profile. Sends CreateProfile.

pub fn default_profile( &self, profile_family: ProfileFamily, ) -> RequestBuilder<'_, DefaultProfile>

Reads the number of the default 3GPP profile. Sends GetDefaultProfile.

pub fn delete_profile(&self, profile: ProfileId) -> RequestBuilder<'_, ()>

Deletes a profile. Sends DeleteProfile.

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

Subscribes to packet service status indications.

The modem sends them without a registration. Only indications received after this call are delivered, so subscribe before you start a call.

§Errors

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

pub fn lte_attach_params(&self) -> RequestBuilder<'_, LteAttachParams>

Reads the parameters of the last LTE attach. Sends GetLteAttachParams.

pub fn lte_attach_pdn_list(&self) -> RequestBuilder<'_, LteAttachPdnList>

Reads the LTE attach PDN list. Sends GetLteAttachPdnList.

pub fn modify_profile_settings( &self, index: ProfileIndex, settings: &Profile, ) -> RequestBuilder<'_, ()>

Sets the settings of a 3GPP profile. Sends ModifyProfileSettings.

pub fn packet_service_status(&self) -> RequestBuilder<'_, PacketServiceState>

Reads the state of the packet data connection of this client. Sends GetPacketServiceStatus.

pub fn profile_list( &self, request: &GetProfileList, ) -> RequestBuilder<'_, ProfileList>

Reads the list of profiles. Sends GetProfileList.

pub fn profile_settings( &self, index: ProfileIndex, ) -> RequestBuilder<'_, ProfileSettings>

Reads the settings of a 3GPP profile. Sends GetProfileSettings.

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

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

pub fn runtime_settings( &self, request: &GetRuntimeSettings, ) -> RequestBuilder<'_, RuntimeSettings>

Reads the settings of the data call of this client. Sends GetRuntimeSettings.

pub fn set_default_profile( &self, profile_family: ProfileFamily, index: ProfileIndex, ) -> RequestBuilder<'_, ()>

Sets the number of the default 3GPP profile. Sends SetDefaultProfile.

pub fn set_ip_family(&self, ip_family: IpFamily) -> RequestBuilder<'_, ()>

Sets the IP family of the data calls of this client. Sends SetIpFamily.

pub fn set_lte_attach_pdn_list( &self, request: &SetLteAttachPdnList<'_>, ) -> RequestBuilder<'_, ()>

Sets the LTE attach PDN list. Sends SetLteAttachPdnList.

SetLteAttachPdnList::new checks the number of profiles.

pub fn start_network( &self, request: &StartNetwork, ) -> RequestBuilder<'_, StartedNetwork, Result<StartedNetwork, Error>>

Starts a data call. Sends StartNetwork.

If the network refuses the call, the request returns Error::CallFailed with the reason instead of a plain rejection.

pub fn stop_network(&self, handle: PacketDataHandle) -> RequestBuilder<'_, ()>

Ends a data call. Sends StopNetwork.

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

§

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