Struct VarSet

Source
pub struct VarSet {
    pub set: Vec<Var>,
    pub has: VarMap<bool>,
}

Fields§

§set: Vec<Var>§has: VarMap<bool>

Implementations§

Source§

impl VarSet

Source

pub fn new() -> Self

Source

pub fn new_with(var: Var) -> Self

Source

pub fn len(&self) -> u32

Source

pub fn reserve(&mut self, var: Var)

Source

pub fn has(&self, var: Var) -> bool

Source

pub fn insert(&mut self, var: Var)

Source

pub fn clear(&mut self)

Source

pub fn iter(&self) -> Iter<'_, Var>

Source

pub fn remove(&mut self, i: u32)

Source

pub fn swap(&mut self, a: u32, b: u32)

Source

pub fn elements(&self) -> &[Var]

Trait Implementations§

Source§

impl Default for VarSet

Source§

fn default() -> VarSet

Returns the “default value” for a type. Read more
Source§

impl Index<u32> for VarSet

Source§

type Output = Var

The returned type after indexing.
Source§

fn index(&self, index: u32) -> &Self::Output

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl Freeze for VarSet

§

impl RefUnwindSafe for VarSet

§

impl Send for VarSet

§

impl Sync for VarSet

§

impl Unpin for VarSet

§

impl UnwindSafe for VarSet

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.