FirstElem

Trait FirstElem 

Source
pub trait FirstElem {
    type Out;

    // Required method
    fn first_elem(&self) -> Option<Self::Out>;
}
Expand description

Get the first element

Required Associated Types§

Required Methods§

Source

fn first_elem(&self) -> Option<Self::Out>

Implementations on Foreign Types§

Source§

impl FirstElem for char

Source§

type Out = char

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for f32

Source§

type Out = f32

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for f64

Source§

type Out = f64

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for i8

Source§

type Out = i8

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for i16

Source§

type Out = i16

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for i32

Source§

type Out = i32

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for i64

Source§

type Out = i64

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for i128

Source§

type Out = i128

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for str

Source§

type Out = char

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for u8

Source§

type Out = u8

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for u16

Source§

type Out = u16

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for u32

Source§

type Out = u32

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for u64

Source§

type Out = u64

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for u128

Source§

type Out = u128

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl FirstElem for ()

Source§

impl<T: FirstElem + ?Sized> FirstElem for &T

Source§

type Out = <T as FirstElem>::Out

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl<T: FirstElem + ?Sized> FirstElem for &mut T

Source§

type Out = <T as FirstElem>::Out

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl<T: FirstElem> FirstElem for Option<T>

Source§

type Out = <T as FirstElem>::Out

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

impl<T: FirstElem> FirstElem for [T]

Source§

type Out = <T as FirstElem>::Out

Source§

fn first_elem(&self) -> Option<Self::Out>

Source§

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

Source§

type Out = <T as FirstElem>::Out

Source§

fn first_elem(&self) -> Option<Self::Out>

Implementors§