Struct canrun::collections::lvec::LVec[][src]

pub struct LVec<T: Debug> { /* fields omitted */ }
Expand description

A Vec-like data structure with LVar values.

Implementations

Create a new LVec value.

You may also be interested in the lvec! macro.

Example:

use canrun::lvec::LVec;

let map: LVec<i32> = LVec::new();

Get the number of elements in the LVec.

Example:

use canrun::lvec::{LVec, lvec};

let map: LVec<i32> = lvec![1, 2];
assert_eq!(map.len(), 2);

Returns true if the LVec contains no elements.

Example:

use canrun::lvec::{LVec, lvec};

let map: LVec<i32> = lvec![1, 2];
assert_eq!(map.is_empty(), false);

Add a value to an existing LVec.

Example:

use canrun::lvec::LVec;

let mut map: LVec<i32> = LVec::new();
map.push(1);

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

The “concrete” type that Self reifies to.

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

Attempt to unify two fully resolved values. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.