[−][src]Struct lnpbp::features::FlagVec
Structure holding a given set of features
Implementations
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 Binary for FlagVec
[src]
impl BitAnd<FlagVec> for FlagVec
[src]
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: Self) -> Self::Output
[src]
impl BitOr<FlagVec> for FlagVec
[src]
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: Self) -> Self::Output
[src]
impl BitXor<FlagVec> for FlagVec
[src]
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: Self) -> Self::Output
[src]
impl Clone for FlagVec
[src]
impl Debug for FlagVec
[src]
impl Default for FlagVec
[src]
impl Display for FlagVec
[src]
impl Eq for FlagVec
[src]
impl FromStr for FlagVec
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for FlagVec
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for FlagVec
[src]
impl Octal for FlagVec
[src]
impl PartialEq<FlagVec> for FlagVec
[src]
impl StrictDecode for FlagVec
[src]
type Error = Error
Implementation-dependent error type
fn strict_decode<D: Read>(d: D) -> Result<Self, Self::Error>
[src]
impl StrictEncode for FlagVec
[src]
type Error = Error
Implementation-dependent error type
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Self::Error>
[src]
impl<'_> TryFrom<&'_ [u8]> for FlagVec
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(value: &[u8]) -> Result<Self, Self::Error>
[src]
impl TryFrom<Vec<u8>> for FlagVec
[src]
type Error = ParseError
The type returned in the event of a conversion error.
fn try_from(value: Vec<u8>) -> Result<Self, Self::Error>
[src]
impl UpperHex for FlagVec
[src]
Auto Trait Implementations
impl RefUnwindSafe for FlagVec
impl Send for FlagVec
impl Sync for FlagVec
impl Unpin for FlagVec
impl UnwindSafe for FlagVec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: LowerHex,
[src]
T: LowerHex,
impl<T> ToHex for T where
T: LowerHex,
[src]
T: LowerHex,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,