pub struct DiscardableFlag(/* private fields */);Expand description
1-bit discardable flag + 7 reserved bits packed into a u8.
The discardable flag indicates whether an option can be safely ignored by receivers that don’t understand it. The remaining 7 bits are reserved and should be set to 0.
Implementations§
Source§impl DiscardableFlag
impl DiscardableFlag
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DiscardableFlag with all bits set to 0.
§Returns
A DiscardableFlag with discardable=false and reserved=0
Sourcepub fn is_discardable(&self) -> bool
pub fn is_discardable(&self) -> bool
Sourcepub fn set_discardable(&mut self, discardable: bool)
pub fn set_discardable(&mut self, discardable: bool)
Trait Implementations§
Source§impl Clone for DiscardableFlag
impl Clone for DiscardableFlag
Source§fn clone(&self) -> DiscardableFlag
fn clone(&self) -> DiscardableFlag
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 DiscardableFlag
impl Debug for DiscardableFlag
Source§impl PartialEq for DiscardableFlag
impl PartialEq for DiscardableFlag
impl Copy for DiscardableFlag
impl Eq for DiscardableFlag
impl StructuralPartialEq for DiscardableFlag
Auto Trait Implementations§
impl Freeze for DiscardableFlag
impl RefUnwindSafe for DiscardableFlag
impl Send for DiscardableFlag
impl Sync for DiscardableFlag
impl Unpin for DiscardableFlag
impl UnwindSafe for DiscardableFlag
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