Struct sc_network_common::sync::message::BlockAttributes   
source · pub struct BlockAttributes { /* private fields */ }Expand description
Node roles bitmask.
Implementations§
source§impl BlockAttributes
 
impl BlockAttributes
sourcepub const MESSAGE_QUEUE: Self = _
 
pub const MESSAGE_QUEUE: Self = _
Include block message queue.
sourcepub const JUSTIFICATION: Self = _
 
pub const JUSTIFICATION: Self = _
Include a justification for the block.
sourcepub const INDEXED_BODY: Self = _
 
pub const INDEXED_BODY: Self = _
Include indexed transactions for a block.
sourcepub const fn from_bits(bits: u8) -> Option<Self>
 
pub const fn from_bits(bits: u8) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u8) -> Self
 
pub const fn from_bits_truncate(bits: u8) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> Self
 
pub const unsafe fn from_bits_unchecked(bits: u8) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags! macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked() has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: Self) -> bool
 
pub const fn intersects(&self, other: Self) -> bool
Returns true if there are flags common to both self and other.
sourcepub const fn contains(&self, other: Self) -> bool
 
pub const fn contains(&self, other: Self) -> bool
Returns true if all of the flags in other are contained within self.
sourcepub fn set(&mut self, other: Self, value: bool)
 
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: Self) -> Self
 
pub const fn intersection(self, other: Self) -> Self
Returns the intersection between the flags in self and
other.
Specifically, the returned set contains only the flags which are
present in both self and other.
This is equivalent to using the & operator (e.g.
ops::BitAnd), as in flags & other.
sourcepub const fn union(self, other: Self) -> Self
 
pub const fn union(self, other: Self) -> Self
Returns the union of between the flags in self and other.
Specifically, the returned set contains all flags which are
present in either self or other, including any which are
present in both (see Self::symmetric_difference if that
is undesirable).
This is equivalent to using the | operator (e.g.
ops::BitOr), as in flags | other.
sourcepub const fn difference(self, other: Self) -> Self
 
pub const fn difference(self, other: Self) -> Self
Returns the difference between the flags in self and other.
Specifically, the returned set contains all flags present in
self, except for the ones present in other.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other (and this syntax is also supported).
This is equivalent to using the - operator (e.g.
ops::Sub), as in flags - other.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
 
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the flags
in self and other.
Specifically, the returned set contains the flags present which
are present in self or other, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self and other.
This is equivalent to using the ^ operator (e.g.
ops::BitXor), as in flags ^ other.
sourcepub const fn complement(self) -> Self
 
pub const fn complement(self) -> Self
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all() and self (e.g. Self::all() - self)
This is equivalent to using the ! operator (e.g.
ops::Not), as in !flags.
Trait Implementations§
source§impl Binary for BlockAttributes
 
impl Binary for BlockAttributes
source§impl BitAnd<BlockAttributes> for BlockAttributes
 
impl BitAnd<BlockAttributes> for BlockAttributes
source§impl BitAndAssign<BlockAttributes> for BlockAttributes
 
impl BitAndAssign<BlockAttributes> for BlockAttributes
source§fn bitand_assign(&mut self, other: Self)
 
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
source§impl BitOr<BlockAttributes> for BlockAttributes
 
impl BitOr<BlockAttributes> for BlockAttributes
source§fn bitor(self, other: BlockAttributes) -> Self
 
fn bitor(self, other: BlockAttributes) -> Self
Returns the union of the two sets of flags.
§type Output = BlockAttributes
 
type Output = BlockAttributes
| operator.source§impl BitOrAssign<BlockAttributes> for BlockAttributes
 
impl BitOrAssign<BlockAttributes> for BlockAttributes
source§fn bitor_assign(&mut self, other: Self)
 
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
source§impl BitXor<BlockAttributes> for BlockAttributes
 
impl BitXor<BlockAttributes> for BlockAttributes
source§impl BitXorAssign<BlockAttributes> for BlockAttributes
 
impl BitXorAssign<BlockAttributes> for BlockAttributes
source§fn bitxor_assign(&mut self, other: Self)
 
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
source§impl Clone for BlockAttributes
 
impl Clone for BlockAttributes
source§fn clone(&self) -> BlockAttributes
 
fn clone(&self) -> BlockAttributes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for BlockAttributes
 
impl Debug for BlockAttributes
source§impl Decode for BlockAttributes
 
impl Decode for BlockAttributes
source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
 
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
§fn decode_into<I>(
    input: &mut I,
    dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
    I: Input,
 
fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self> ) -> Result<DecodeFinished, Error>where I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
    I: Input,
 
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
§fn encoded_fixed_size() -> Option<usize>
 
fn encoded_fixed_size() -> Option<usize>
source§impl Encode for BlockAttributes
 
impl Encode for BlockAttributes
source§fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
 
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T)
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
    F: FnOnce(&[u8]) -> R,
 
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
§fn encoded_size(&self) -> usize
 
fn encoded_size(&self) -> usize
source§impl Extend<BlockAttributes> for BlockAttributes
 
impl Extend<BlockAttributes> for BlockAttributes
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
 
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
source§fn extend_one(&mut self, item: A)
 
fn extend_one(&mut self, item: A)
extend_one)source§fn extend_reserve(&mut self, additional: usize)
 
fn extend_reserve(&mut self, additional: usize)
extend_one)source§impl FromIterator<BlockAttributes> for BlockAttributes
 
impl FromIterator<BlockAttributes> for BlockAttributes
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
 
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
source§impl Hash for BlockAttributes
 
impl Hash for BlockAttributes
source§impl LowerHex for BlockAttributes
 
impl LowerHex for BlockAttributes
source§impl Not for BlockAttributes
 
impl Not for BlockAttributes
source§impl Octal for BlockAttributes
 
impl Octal for BlockAttributes
source§impl Ord for BlockAttributes
 
impl Ord for BlockAttributes
source§fn cmp(&self, other: &BlockAttributes) -> Ordering
 
fn cmp(&self, other: &BlockAttributes) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<BlockAttributes> for BlockAttributes
 
impl PartialEq<BlockAttributes> for BlockAttributes
source§fn eq(&self, other: &BlockAttributes) -> bool
 
fn eq(&self, other: &BlockAttributes) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<BlockAttributes> for BlockAttributes
 
impl PartialOrd<BlockAttributes> for BlockAttributes
source§fn partial_cmp(&self, other: &BlockAttributes) -> Option<Ordering>
 
fn partial_cmp(&self, other: &BlockAttributes) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Sub<BlockAttributes> for BlockAttributes
 
impl Sub<BlockAttributes> for BlockAttributes
source§impl SubAssign<BlockAttributes> for BlockAttributes
 
impl SubAssign<BlockAttributes> for BlockAttributes
source§fn sub_assign(&mut self, other: Self)
 
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.
source§impl UpperHex for BlockAttributes
 
impl UpperHex for BlockAttributes
impl Copy for BlockAttributes
impl EncodeLike<BlockAttributes> for BlockAttributes
impl Eq for BlockAttributes
impl StructuralEq for BlockAttributes
impl StructuralPartialEq for BlockAttributes
Auto Trait Implementations§
impl RefUnwindSafe for BlockAttributes
impl Send for BlockAttributes
impl Sync for BlockAttributes
impl Unpin for BlockAttributes
impl UnwindSafe for BlockAttributes
Blanket Implementations§
source§impl<T> CheckedConversion for T
 
impl<T> CheckedConversion for T
§impl<T> DecodeAll for Twhere
    T: Decode,
 
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
 
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
    T: Decode,
 
impl<T> DecodeLimit for Twhere T: Decode,
source§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
source§impl<T> Instrument for T
 
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>,
 
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> KeyedVec for Twhere
    T: Codec,
 
impl<T> KeyedVec for Twhere T: Codec,
§impl<T> Pointable for T
 
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
 
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
    Self: UniqueSaturatedFrom<T>,
 
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
    Self: UniqueSaturatedInto<T>,
 
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
    T: UncheckedFrom<S>,
 
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
 
fn unchecked_into(self) -> T
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
    T: Bounded,
    S: TryInto<T>,
 
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
 
fn unique_saturated_into(self) -> T
T.