#[repr(C)]
pub struct otSrpClientService {
Show 13 fields pub mName: *const c_char, pub mInstanceName: *const c_char, pub mSubTypeLabels: *const *const c_char, pub mTxtEntries: *const otDnsTxtEntry, pub mPort: u16, pub mPriority: u16, pub mWeight: u16, pub mNumTxtEntries: u8, pub mState: otSrpClientItemState, pub mData: u32, pub mNext: *mut otSrpClientService, pub mLease: u32, pub mKeyLease: u32,
}
Expand description

Represents an SRP client service.

The values in this structure, including the string buffers for the names and the TXT record entries, MUST persist and stay constant after an instance of this structure is passed to OpenThread from otSrpClientAddService() or otSrpClientRemoveService().

The mState, mData, mNext fields are used/managed by OT core only. Their value is ignored when an instance of otSrpClientService is passed in otSrpClientAddService() or otSrpClientRemoveService() or other functions. The caller does not need to set these fields.

The mLease and mKeyLease fields specify the desired lease and key lease intervals for this service. Zero value indicates that the interval is unspecified and then the default lease or key lease intervals from otSrpClientGetLeaseInterval() and otSrpClientGetKeyLeaseInterval() are used for this service. If the key lease interval (whether set explicitly or determined from the default) is shorter than the lease interval for a service, SRP client will re-use the lease interval value for key lease interval as well. For example, if in service mLease is explicitly set to 2 days and mKeyLease is set to zero and default key lease is set to 1 day, then when registering this service, the requested key lease for this service is also set to 2 days.

Fields§

§mName: *const c_char

< The service labels (e.g., “_mt._udp”, not the full domain name).

§mInstanceName: *const c_char

< The service instance name label (not the full name).

§mSubTypeLabels: *const *const c_char

< Array of sub-type labels (must end with NULL or can be NULL).

§mTxtEntries: *const otDnsTxtEntry

< Array of TXT entries (mNumTxtEntries gives num of entries).

§mPort: u16

< The service port number.

§mPriority: u16

< The service priority.

§mWeight: u16

< The service weight.

§mNumTxtEntries: u8

< Number of entries in the mTxtEntries array.

§mState: otSrpClientItemState

< Service state (managed by OT core).

§mData: u32

< Internal data (used by OT core).

§mNext: *mut otSrpClientService

< Pointer to next entry in a linked-list (managed by OT core).

§mLease: u32

< Desired lease interval in sec - zero to use default.

§mKeyLease: u32

< Desired key lease interval in sec - zero to use default.

Trait Implementations§

source§

impl Clone for otSrpClientService

source§

fn clone(&self) -> otSrpClientService

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for otSrpClientService

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for otSrpClientService

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for otSrpClientService

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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,

§

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>,

§

type Error = Infallible

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>,

§

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.