Struct wallet::features::FlagVec [−][src]
pub struct FlagVec(_);
Structure holding a given set of features
Implementations
impl FlagVec
[src]
impl FlagVec
[src]pub fn new() -> FlagVec
[src]
Constructs a features vector of zero feature flag set
pub fn with_capacity(upto: FlagNo) -> Self
[src]
Constructs a features vector of upto
feature flag in unset state
pub fn shrunk(&self) -> Self
[src]
Returns a shrunk copy of the self
pub fn iter(&self) -> AllSet<'_>ⓘ
[src]
Creates an iterator for the current feature flags which have “set” state
pub fn known_iter(&self, known: FlagVec) -> FilteredIter<'_>ⓘNotable traits for FilteredIter<'_>
impl Iterator for FilteredIter<'_> type Item = FlagNo;
[src]
Notable traits for FilteredIter<'_>
impl Iterator for FilteredIter<'_> type Item = FlagNo;
Creates iterator over known set of the features
pub fn unknown_iter(&self, known: FlagVec) -> FilteredIter<'_>ⓘNotable traits for FilteredIter<'_>
impl Iterator for FilteredIter<'_> type Item = FlagNo;
[src]
Notable traits for FilteredIter<'_>
impl Iterator for FilteredIter<'_> type Item = FlagNo;
Creates iterator over unknown set of the features, i.e. features that
do not match flags set in known
parameter
pub fn shrink(&mut self) -> bool
[src]
Reduces the size of the internal buffer to the smallest capacity
required to keep all currently set feature flags. Returns true
if
resize operation was required, or false
otherwise, when the internal
buffer already was of the smallest possible size
pub fn is_set(&self, flag_no: FlagNo) -> bool
[src]
Returns whether a feature flag with flag_no
is set (true
or false
)
pub fn set(&mut self, flag_no: FlagNo) -> bool
[src]
Sets the feature flag with number flag_no
. Returns true
if the flag
was already set and false
otherwise (i.e. previous value of the flag)
pub fn unset(&mut self, flag_no: FlagNo) -> bool
[src]
Unsets the feature flag with number flag_no
. Returns true
if the
flag was set before and false
otherwise (i.e. previous value of the
flag)
pub fn invert(&mut self, flag_no: FlagNo)
[src]
Inverts the feature flag with number flag_no
Trait Implementations
impl PartialOrd<FlagVec> for FlagVec
[src]
impl PartialOrd<FlagVec> for FlagVec
[src]impl StrictDecode for FlagVec
[src]
impl StrictDecode for FlagVec
[src]impl StrictEncode for FlagVec
[src]
impl StrictEncode for FlagVec
[src]Auto Trait Implementations
impl RefUnwindSafe for FlagVec
impl RefUnwindSafe for FlagVec
impl UnwindSafe for FlagVec
impl UnwindSafe for FlagVec