Struct snarkvm_r1cs::OptionalVec [−][src]
pub struct OptionalVec<T> { /* fields omitted */ }
Implementations
impl<T> OptionalVec<T>
[src]
impl<T> OptionalVec<T>
[src]pub fn with_capacity(cap: usize) -> Self
[src]
pub fn with_capacity(cap: usize) -> Self
[src]Creates a new OptionalVec
with the given underlying capacity.
pub fn insert(&mut self, elem: T) -> usize
[src]
pub fn insert(&mut self, elem: T) -> usize
[src]Inserts a new value either into the first existing hole or extending the vector of values, i.e. pushing it to its end.
pub fn next_idx(&self) -> usize
[src]
pub fn next_idx(&self) -> usize
[src]Returns the index of the next value inserted into the OptionalVec
.
pub fn remove(&mut self, idx: usize) -> T
[src]
pub fn remove(&mut self, idx: usize) -> T
[src]Removes a value at the specified index; assumes that the index points to
an existing value that is a Some(T)
(i.e. not a hole).
Trait Implementations
impl<T> Default for OptionalVec<T>
[src]
impl<T> Default for OptionalVec<T>
[src]impl<T> Index<usize> for OptionalVec<T>
[src]
impl<T> Index<usize> for OptionalVec<T>
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for OptionalVec<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for OptionalVec<T> where
T: Send,
T: Send,
impl<T> Sync for OptionalVec<T> where
T: Sync,
T: Sync,
impl<T> Unpin for OptionalVec<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for OptionalVec<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,