Trait ArrayExt

Source
pub trait ArrayExt: Array {
    // Provided methods
    fn as_<A: Array + 'static>(&self) -> &A { ... }
    fn as_opt<A: Array + 'static>(&self) -> Option<&A> { ... }
    fn is<A: Array + 'static>(&self) -> bool { ... }
}

Provided Methods§

Source

fn as_<A: Array + 'static>(&self) -> &A

Returns the array downcast to the given A.

Source

fn as_opt<A: Array + 'static>(&self) -> Option<&A>

Returns the array downcast to the given A.

Source

fn is<A: Array + 'static>(&self) -> bool

Is self an array with encoding A.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: Array + ?Sized> ArrayExt for A