pub enum BroadcastReceiveState {
Empty,
NonEmpty(ReceiveState),
}
Expand description
Broadcast Receive State characteristic as defined in Broadcast Audio Scan Service spec v1.0 Section 3.2. The Broadcast Receive State characteristic is used by the server to expose information about a Broadcast Source. If the server has not written a Source_ID value to the Broadcast Receive State characteristic, the Broadcast Recieve State characteristic value shall be empty.
Variants§
Empty
NonEmpty(ReceiveState)
Implementations§
Source§impl BroadcastReceiveState
impl BroadcastReceiveState
pub fn is_empty(&self) -> bool
pub fn broadcast_id(&self) -> Option<BroadcastId>
pub fn has_same_broadcast_id(&self, other: &BroadcastReceiveState) -> bool
Trait Implementations§
Source§impl Clone for BroadcastReceiveState
impl Clone for BroadcastReceiveState
Source§fn clone(&self) -> BroadcastReceiveState
fn clone(&self) -> BroadcastReceiveState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BroadcastReceiveState
impl Debug for BroadcastReceiveState
Source§impl Decodable for BroadcastReceiveState
impl Decodable for BroadcastReceiveState
type Error = Error
Source§fn decode(buf: &[u8]) -> (Result<Self, Self::Error>, usize)
fn decode(buf: &[u8]) -> (Result<Self, Self::Error>, usize)
Decodes into a new object or an error, and the number of bytes that
the decoding consumed. Should attempt to consume the entire item from
the buffer in the case of an error. If the item end cannot be determined,
return an error and consume the entirety of the bufer (
buf.len()
)§fn decode_multiple(
buf: &[u8],
max: Option<usize>,
) -> (Vec<Result<Self, Self::Error>>, usize)
fn decode_multiple( buf: &[u8], max: Option<usize>, ) -> (Vec<Result<Self, Self::Error>>, usize)
Tries to decode a collection of this object concatenated in a buffer.
Returns a vector of items (or errors) and the number of bytes consumed to
decode them.
Continues to decode items until the buffer is consumed or the max items.
If None, will decode the entire buffer.
Source§impl Encodable for BroadcastReceiveState
impl Encodable for BroadcastReceiveState
Source§impl PartialEq for BroadcastReceiveState
impl PartialEq for BroadcastReceiveState
impl StructuralPartialEq for BroadcastReceiveState
Auto Trait Implementations§
impl Freeze for BroadcastReceiveState
impl RefUnwindSafe for BroadcastReceiveState
impl Send for BroadcastReceiveState
impl Sync for BroadcastReceiveState
impl Unpin for BroadcastReceiveState
impl UnwindSafe for BroadcastReceiveState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more