Enum Advertisement

Source
pub enum Advertisement<'d> {
    ConnectableScannableUndirected {
        adv_data: &'d [u8],
        scan_data: &'d [u8],
    },
    ConnectableNonscannableDirected {
        peer: Address,
    },
    ConnectableNonscannableDirectedHighDuty {
        peer: Address,
    },
    NonconnectableScannableUndirected {
        adv_data: &'d [u8],
        scan_data: &'d [u8],
    },
    NonconnectableNonscannableUndirected {
        adv_data: &'d [u8],
    },
    ExtConnectableNonscannableUndirected {
        adv_data: &'d [u8],
    },
    ExtConnectableNonscannableDirected {
        peer: Address,
        adv_data: &'d [u8],
    },
    ExtNonconnectableScannableUndirected {
        scan_data: &'d [u8],
    },
    ExtNonconnectableScannableDirected {
        peer: Address,
        scan_data: &'d [u8],
    },
    ExtNonconnectableNonscannableUndirected {
        anonymous: bool,
        adv_data: &'d [u8],
    },
    ExtNonconnectableNonscannableDirected {
        anonymous: bool,
        peer: Address,
        adv_data: &'d [u8],
    },
}
Expand description

Advertisement payload depending on which advertisement kind requested.

Variants§

§

ConnectableScannableUndirected

Connectable and scannable undirected advertisement.

Fields

§adv_data: &'d [u8]

Advertisement data.

§scan_data: &'d [u8]

Scan data.

§

ConnectableNonscannableDirected

Connectable and non-scannable directed advertisement.

Fields

§peer: Address

Address of the peer to direct the advertisement to.

§

ConnectableNonscannableDirectedHighDuty

Connectable and non-scannable directed advertisement with high duty cycle.

Fields

§peer: Address

Address of the peer to direct the advertisement to.

§

NonconnectableScannableUndirected

Nonconnectable and scannable undirected advertisement.

Fields

§adv_data: &'d [u8]

Advertisement data.

§scan_data: &'d [u8]

Scan data.

§

NonconnectableNonscannableUndirected

Nonconnectable and nonscannable undirected advertisement.

Fields

§adv_data: &'d [u8]

Advertisement data.

§

ExtConnectableNonscannableUndirected

Extended connectable and non-scannable undirected advertisement.

Fields

§adv_data: &'d [u8]

Advertisement data.

§

ExtConnectableNonscannableDirected

Extended connectable and non-scannable directed advertisement.

Fields

§peer: Address

Address of the peer to direct the advertisement to.

§adv_data: &'d [u8]

Advertisement data.

§

ExtNonconnectableScannableUndirected

Extended nonconnectable and scannable undirected advertisement.

Fields

§scan_data: &'d [u8]

Scan data.

§

ExtNonconnectableScannableDirected

Extended nonconnectable and scannable directed advertisement.

Fields

§peer: Address

Address of the peer to direct the advertisement to.

§scan_data: &'d [u8]

Scan data.

§

ExtNonconnectableNonscannableUndirected

Extended nonconnectable and nonscannable undirected advertisement.

Fields

§anonymous: bool

Whether the advertisement is anonymous.

§adv_data: &'d [u8]

Advertisement data.

§

ExtNonconnectableNonscannableDirected

Extended nonconnectable and nonscannable directed advertisement.

Fields

§anonymous: bool

Whether the advertisement is anonymous.

§peer: Address

Address of the peer to direct the advertisement to.

§adv_data: &'d [u8]

Advertisement data.

Trait Implementations§

Source§

impl<'d> Clone for Advertisement<'d>

Source§

fn clone(&self) -> Advertisement<'d>

Returns a duplicate 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<'d> Debug for Advertisement<'d>

Source§

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

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

impl<'d> Copy for Advertisement<'d>

Auto Trait Implementations§

§

impl<'d> Freeze for Advertisement<'d>

§

impl<'d> RefUnwindSafe for Advertisement<'d>

§

impl<'d> Send for Advertisement<'d>

§

impl<'d> Sync for Advertisement<'d>

§

impl<'d> Unpin for Advertisement<'d>

§

impl<'d> UnwindSafe for Advertisement<'d>

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.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

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.