Skip to main content

DppUriReadyRef

Struct DppUriReadyRef 

Source
pub struct DppUriReadyRef(/* private fields */);
Expand description

Payload reference for WifiEvent::DppUriReady.

The URI string is stored in a flexible array member that immediately follows the fixed header; uri_data_len includes the null terminator. DppUriReadyRef::uri strips the terminator and returns the URI as a &str.

Implementations§

Source§

impl DppUriReadyRef

Source

pub fn uri_len(&self) -> usize

Length of the URI string excluding the null terminator.

Source

pub fn uri(&self) -> &str

The DPP bootstrapping URI as a string slice (no null terminator).

The slice is reconstructed from the flexible array member (uri) that immediately follows the fixed header in memory.

DPP bootstrapping URIs are defined by the Wi-Fi Alliance DPP specification to be ASCII-printable, so the bytes are always valid UTF-8.

Trait Implementations§

Source§

impl Debug for DppUriReadyRef

Available on esp_idf_version_at_least_5_5_0 only.
Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for DppUriReadyRef

§

impl RefUnwindSafe for DppUriReadyRef

§

impl Send for DppUriReadyRef

§

impl Sync for DppUriReadyRef

§

impl Unpin for DppUriReadyRef

§

impl UnsafeUnpin for DppUriReadyRef

§

impl UnwindSafe for DppUriReadyRef

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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.
§

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

Performs the conversion.