Struct binf::Flag

source ·
pub struct Flag {
    pub fvec: Vec<bool>,
}
Expand description

struct that holds data for a flag and useful functions

Fields§

§fvec: Vec<bool>

Implementations§

add a flag value (if flag already exists returns an Err)

set a flag value regardless if it exists or not

get a flags value if it doesn’t exist returns err

returns a vector with all enabled flags

extends the Vec to set size (so that getflag wont err)

checks if a flag at index exists

creates Flag from int

returns flags

initializes a Flag with 0, use flag_new! macro to create with flags instead

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.