Struct soroban_sdk::Vec
source · [−]#[repr(transparent)]pub struct Vec<T>(_, _);
Expand description
Vec is a sequential and indexable growable collection type.
Values are stored in the environment and are available to contract through the functions defined on Vec. Values stored in the Vec are transmitted to the environment as RawVals, and when retrieved from the Vec are transmitted back and converted from RawVal back into their type.
The values in a Vec are not guaranteed to be of type T
and conversion will
fail if they are not. Most functions on Vec return a Result
due to this.
To store u8
s and binary data, use Bytes/BytesN instead.
Vec values can be stored as Data, or in other types like Vec, Map, etc.
Examples
use soroban_sdk::{vec, Env};
let env = Env::default();
let vec = vec![&env, 0, 1, 2, 3];
assert_eq!(vec.len(), 4);
Implementation Details
The following information is implementation details that has no consistency guarantee.
Values are stored in the environment backed by a RRB-vector using im_rc::Vector. Most operations are O(log n). Push/pop are O(1) amortised, and O(log n) in the worst case.
Implementations
sourceimpl<T> Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
pub fn new(env: &Env) -> Vec<T>
pub fn from_array<const N: usize>(env: &Env, items: [T; N]) -> Vec<T>
pub fn from_slice(env: &Env, items: &[T]) -> Vec<T>where
T: Clone,
pub fn get(&self, i: u32) -> Option<Result<T, T::Error>>
pub fn get_unchecked(&self, i: u32) -> Result<T, T::Error>where
T::Error: Debug,
pub fn set(&mut self, i: u32, v: T)
pub fn remove(&mut self, i: u32) -> Option<()>
pub fn remove_unchecked(&mut self, i: u32)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> u32
pub fn push_front(&mut self, x: T)
pub fn pop_front(&mut self) -> Option<Result<T, T::Error>>
pub fn pop_front_unchecked(&mut self) -> Result<T, T::Error>
pub fn push_back(&mut self, x: T)
pub fn pop_back(&mut self) -> Option<Result<T, T::Error>>
pub fn pop_back_unchecked(&mut self) -> Result<T, T::Error>
pub fn push(&mut self, x: T)
pub fn pop(&mut self) -> Option<Result<T, T::Error>>
pub fn pop_unchecked(&mut self) -> Result<T, T::Error>
pub fn first(&self) -> Option<Result<T, T::Error>>
pub fn first_unchecked(&self) -> Result<T, T::Error>
pub fn last(&self) -> Option<Result<T, T::Error>>
pub fn last_unchecked(&self) -> Result<T, T::Error>
pub fn insert(&mut self, i: u32, x: T)
pub fn append(&mut self, other: &Vec<T>)
pub fn extend_from_array<const N: usize>(&mut self, items: [T; N])
pub fn extend_from_slice(&mut self, items: &[T])where
T: Clone,
pub fn slice(&self, r: impl RangeBounds<u32>) -> Self
pub fn iter(&self) -> VecIter<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Clone,
pub fn iter_unchecked(&self) -> UncheckedIter<VecIter<T>, T, T::Error>ⓘNotable traits for UncheckedIter<I, T, E>impl<I, T, E> Iterator for UncheckedIter<I, T, E>where
I: Iterator<Item = Result<T, E>>,
E: Debug, type Item = T;
where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Clone,
T::Error: Debug,
I: Iterator<Item = Result<T, E>>,
E: Debug, type Item = T;
pub fn into_iter_unchecked(self) -> UncheckedIter<VecIter<T>, T, T::Error>ⓘNotable traits for UncheckedIter<I, T, E>impl<I, T, E> Iterator for UncheckedIter<I, T, E>where
I: Iterator<Item = Result<T, E>>,
E: Debug, type Item = T;
where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Clone,
T::Error: Debug,
I: Iterator<Item = Result<T, E>>,
E: Debug, type Item = T;
sourceimpl<T> Vec<T>where
for<'a> &'a T: IntoVal<Env, RawVal>,
impl<T> Vec<T>where
for<'a> &'a T: IntoVal<Env, RawVal>,
sourcepub fn contains(&self, item: impl Borrow<T>) -> bool
pub fn contains(&self, item: impl Borrow<T>) -> bool
Returns true if the Vec contains the item.
sourcepub fn first_index_of(&self, item: impl Borrow<T>) -> Option<u32>
pub fn first_index_of(&self, item: impl Borrow<T>) -> Option<u32>
Returns the index of the first occurrence of the item.
If the item cannot be found None is returned.
sourcepub fn last_index_of(&self, item: impl Borrow<T>) -> Option<u32>
pub fn last_index_of(&self, item: impl Borrow<T>) -> Option<u32>
Returns the index of the last occurrence of the item.
If the item cannot be found None is returned.
sourcepub fn binary_search(&self, item: impl Borrow<T>) -> Result<u32, u32>
pub fn binary_search(&self, item: impl Borrow<T>) -> Result<u32, u32>
Returns the index of an occurrence of the item in an already sorted Vec, or the index of where the item can be inserted to keep the Vec sorted.
If the item is found, Result::Ok is returned containing the index of the item.
If the item is not found, Result::Err is returned containing the index of where the item could be inserted to retain the sorted ordering.
Trait Implementations
sourceimpl<T> Debug for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Debug + Clone,
T::Error: Debug,
impl<T> Debug for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Debug + Clone,
T::Error: Debug,
sourceimpl<T> From<Vec<T>> for EnvVal<Env, Object>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> From<Vec<T>> for EnvVal<Env, Object>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> IntoIterator for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoIterator for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> IntoVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
fn into_val(self, _env: &Env) -> Object
fn into_env_val(self, env: &E) -> EnvVal<E, V>
sourceimpl<T> IntoVal<Env, RawVal> for &Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, RawVal> for &Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> IntoVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> IntoVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
for<'a> &'a T12: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
for<'a> &'a T12: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
for<'a> &'a T11: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
for<'a> &'a T10: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
for<'a> &'a T9: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7, T8)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
for<'a> &'a T8: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6, T7)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
for<'a> &'a T7: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5, T6)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
for<'a> &'a T6: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4, T5)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
for<'a> &'a T5: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3, T4)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
for<'a> &'a T4: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2, T3)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
for<'a> &'a T3: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
impl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for &(T0, T1, T2)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
for<'a> &'a T2: IntoVal<Env, RawVal>,
sourceimpl<T0, T1> IntoVal<Env, Vec<RawVal>> for &(T0, T1)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
impl<T0, T1> IntoVal<Env, Vec<RawVal>> for &(T0, T1)where
for<'a> &'a T0: IntoVal<Env, RawVal>,
for<'a> &'a T1: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
T12: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
T12: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
T11: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
T10: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
T9: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
T8: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6, T7> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6, T7)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
T7: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5, T6> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5, T6)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
T6: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4, T5> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4, T5)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
T5: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3, T4> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3, T4)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
T4: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
impl<T0, T1, T2, T3> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2, T3)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
T3: IntoVal<Env, RawVal>,
sourceimpl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
impl<T0, T1, T2> IntoVal<Env, Vec<RawVal>> for (T0, T1, T2)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
T2: IntoVal<Env, RawVal>,
sourceimpl<T0, T1> IntoVal<Env, Vec<RawVal>> for (T0, T1)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
impl<T0, T1> IntoVal<Env, Vec<RawVal>> for (T0, T1)where
T0: IntoVal<Env, RawVal>,
T1: IntoVal<Env, RawVal>,
sourceimpl<T> Ord for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> Ord for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl<T> PartialEq<Vec<T>> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> PartialEq<Vec<T>> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> PartialOrd<Vec<T>> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> PartialOrd<Vec<T>> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl<T> TryFromVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, Object> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, obj: Object) -> Result<Self, Self::Error>
sourceimpl<T> TryFromVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, RawVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
sourceimpl<T> TryFromVal<Env, ScObject> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScObject> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScObject) -> Result<Self, Self::Error>
sourceimpl<T> TryFromVal<Env, ScVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScVal> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVal) -> Result<Self, Self::Error>
sourceimpl<T> TryFromVal<Env, ScVec> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryFromVal<Env, ScVec> for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_from_val(env: &Env, val: ScVec) -> Result<Self, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for Objectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for Objectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for RawValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for RawValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScObjectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScObjectwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScValwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<T> TryIntoVal<Env, Vec<T>> for ScVecwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
impl<T> TryIntoVal<Env, Vec<T>> for ScVecwhere
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
type Error = ConversionError
fn try_into_val(self, env: &Env) -> Result<Vec<T>, Self::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
impl<T> Eq for Vec<T>where
T: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal>,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Vec<T>
impl<T> !Send for Vec<T>
impl<T> !Sync for Vec<T>
impl<T> Unpin for Vec<T>where
T: Unpin,
impl<T> !UnwindSafe for Vec<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Deserialize for Twhere
T: TryFromVal<Env, RawVal>,
impl<T> Deserialize for Twhere
T: TryFromVal<Env, RawVal>,
type Error = <T as TryFromVal<Env, RawVal>>::Error
fn deserialize(env: &Env, b: &Bytes) -> Result<T, <T as Deserialize>::Error>
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more