Skip to main content

Array

Struct Array 

Source
pub struct Array<C>(/* private fields */);
Expand description

Lean’s Array α as a Vec.

Implementations§

Source§

impl<C: Codec> Array<C>

Source

pub fn from_slice(items: &[C::Rust]) -> Obj

Trait Implementations§

Source§

impl<C: Codec> Codec for Array<C>

Source§

type Rust = Vec<<C as Codec>::Rust>

Source§

fn to_lean(value: &Vec<C::Rust>) -> Obj

A new Lean object with the value, owned by the caller.
Source§

unsafe fn from_lean(object: Obj) -> Vec<C::Rust>

Reads the value out of object and gives up one reference to it. Read more

Auto Trait Implementations§

§

impl<C> Forget for Array<C>

§

impl<C> Freeze for Array<C>
where PhantomData<C>: Freeze,

§

impl<C> Move for Array<C>

§

impl<C> RefUnwindSafe for Array<C>
where C: RefUnwindSafe,

§

impl<C> Send for Array<C>
where C: Send,

§

impl<C> Sync for Array<C>
where C: Sync,

§

impl<C> Unpin for Array<C>
where C: Unpin,

§

impl<C> UnsafeUnpin for Array<C>

§

impl<C> UnwindSafe for Array<C>
where C: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.