Struct canrun::collections::lvec::LVec

source ·
pub struct LVec<T: Unify> { /* private fields */ }
Expand description

A Vec-like data structure with Value values.

Construct with the lvec! macro, or you can use the From<Vec<Value<T>>> or FromIterator<Value<T>> trait implementations.

Implementations§

source§

impl<T: Unify> LVec<T>

source

pub fn len(&self) -> usize

Returns the number of elements in the LVec.

source

pub fn is_empty(&self) -> bool

Returns true if the LVec contains no elements.

Trait Implementations§

source§

impl<T: Debug + Unify> Debug for LVec<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Unify> From<&[Value<T>]> for LVec<T>

source§

fn from(slice: &[Value<T>]) -> Self

Converts to this type from the input type.
source§

impl<T: Unify> From<Vec<Value<T>, Global>> for LVec<T>

source§

fn from(vec: Vec<Value<T>>) -> Self

Converts to this type from the input type.
source§

impl<T: Unify> FromIterator<T> for LVec<T>

source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<T: Unify> FromIterator<Value<T>> for LVec<T>

source§

fn from_iter<I: IntoIterator<Item = Value<T>>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<T: Unify + Reify> Reify for LVec<T>

§

type Reified = Vec<<T as Reify>::Reified, Global>

The “concrete” type that Self reifies to.
source§

fn reify_in(&self, state: &ReadyState) -> Option<Vec<T::Reified>>

Extract a reified Self from a compatible State. This trait is usually used indirectly through the Query trait. Read more
source§

impl<T: Unify> Unify for LVec<T>

source§

fn unify(state: State, a: Rc<Self>, b: Rc<Self>) -> Option<State>

Attempt to unify two fully resolved values. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for LVec<T>where T: RefUnwindSafe,

§

impl<T> !Send for LVec<T>

§

impl<T> !Sync for LVec<T>

§

impl<T> Unpin for LVec<T>where T: Unpin,

§

impl<T> UnwindSafe for LVec<T>where T: UnwindSafe + RefUnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.