Struct arret_runtime::boxed::Vector [−][src]
Immutable vector of boxed values
This allows random access to any of its values.
Implementations
impl<T: Boxed> Vector<T>
[src]
impl<T: Boxed> Vector<T>
[src]pub const MAX_INLINE_LEN: usize
[src]
Maximum element length of an inline vector
pub const EXTERNAL_INLINE_LEN: u32
[src]
Inline element length used for external vectors
pub fn new(
heap: &mut impl AsHeap,
values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Vector<T>>
[src]
heap: &mut impl AsHeap,
values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Vector<T>>
Constructs a new vector with the passed boxed values
pub fn from_values<V, F>(
heap: &mut impl AsHeap,
values: impl Iterator<Item = V>,
cons: F
) -> Gc<Vector<T>> where
F: Fn(&mut Heap, V) -> Gc<T>,
[src]
heap: &mut impl AsHeap,
values: impl Iterator<Item = V>,
cons: F
) -> Gc<Vector<T>> where
F: Fn(&mut Heap, V) -> Gc<T>,
Constructs a vector by constructing an iterator of values
pub fn len(&self) -> usize
[src]
Returns the length of the vector
pub fn is_empty(&self) -> bool
[src]
Returns true if the vector is empty
pub fn get(&self, index: usize) -> Option<Gc<T>>
[src]
Return an element as the provided index
pub fn iter<'a>(&'a self) -> Box<dyn ExactSizeIterator<Item = Gc<T>> + 'a>
[src]
Returns an iterator over the vector
pub fn assoc(
&self,
heap: &mut impl AsHeap,
index: usize,
value: Gc<T>
) -> Gc<Vector<T>>
[src]
&self,
heap: &mut impl AsHeap,
index: usize,
value: Gc<T>
) -> Gc<Vector<T>>
Returns a new vector with the element at the given index replaced
pub fn append(
&self,
heap: &mut impl AsHeap,
other: Gc<Vector<T>>
) -> Gc<Vector<T>>
[src]
&self,
heap: &mut impl AsHeap,
other: Gc<Vector<T>>
) -> Gc<Vector<T>>
Appends the elements in the passed vector and returns a new vector
pub fn extend(
&self,
heap: &mut impl AsHeap,
new_values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Vector<T>>
[src]
&self,
heap: &mut impl AsHeap,
new_values: impl ExactSizeIterator<Item = Gc<T>>
) -> Gc<Vector<T>>
Returns a new vector extended with the values in the passed iterator
pub fn take(&self, heap: &mut impl AsHeap, count: usize) -> Gc<Vector<T>>
[src]
Takes the first count
items from the vector
Trait Implementations
impl<T: Boxed> EncodeBoxedAbiType for Vector<T> where
T: EncodeBoxedAbiType,
[src]
impl<T: Boxed> EncodeBoxedAbiType for Vector<T> where
T: EncodeBoxedAbiType,
[src]const BOXED_ABI_TYPE: BoxedAbiType
[src]
impl<T: Boxed> HashInHeap for Vector<T>
[src]
impl<T: Boxed> HashInHeap for Vector<T>
[src]fn hash_in_heap<H: Hasher>(&self, heap: &Heap, state: &mut H)
[src]
impl<T: Boxed> PartialEqInHeap for Vector<T>
[src]
impl<T: Boxed> PartialEqInHeap for Vector<T>
[src]fn eq_in_heap(&self, heap: &Heap, other: &Vector<T>) -> bool
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Vector<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Vector<T> where
T: Send,
T: Send,
impl<T> Sync for Vector<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Vector<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vector<T> where
T: UnwindSafe,
T: UnwindSafe,