pub struct Advertiser { }
Expand description
Represents a BLE advertiser.
Creates a new Advertiser instance.
§Arguments
state - Initial state of the advertiser.
derive - Function to derive advertisement name and payload from state.
§Returns
A new Advertiser with the advertisement already applied.
§Errors
Returns an error if the advertisement cannot be applied.
Updates the BLE advertisement payload and re-applies the advertisement.
§Arguments
payload - Optional new manufacturer data bytes, or None to clear.
§Returns
Ok(()) on success.
§Errors
Returns an error if the advertisement cannot be re-applied.
Toggles the state of the advertiser.
§Returns
Ok(()) on success.
§Errors
Returns an error if the advertisement cannot be re-applied.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.