wiwi::chain

Trait AsChainInner

Source
pub trait AsChainInner<I>
where Self: Sized + Sealed,
{ // Required methods fn as_inner(&self) -> &I; fn as_inner_mut(&mut self) -> &mut I; }
Expand description

Trait implemented on chains and their inner types, allowing you to get a reference to the inner type regardless of if the chain or the inner type is passed in

Required Methods§

Source

fn as_inner(&self) -> &I

Source

fn as_inner_mut(&mut self) -> &mut I

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.

Implementations on Foreign Types§

Source§

impl<T, const N: usize> AsChainInner<[T; N]> for [T; N]

Source§

fn as_inner(&self) -> &[T; N]

Source§

fn as_inner_mut(&mut self) -> &mut [T; N]

Implementors§

Source§

impl<T> AsChainInner<Vec<T>> for Vec<T>

Source§

impl<T> AsChainInner<Vec<T>> for VecChain<T>

Source§

impl<T, const N: usize> AsChainInner<[T; N]> for ArrayChain<T, N>