[][src]Trait cl_traits::Length

pub trait Length {
    type Output;
    fn length(&self) -> Self::Output;
}

See length for more information.

Associated Types

type Output

Output

Loading content...

Required methods

fn length(&self) -> Self::Output

Holds a certain number of elements.

Loading content...

Implementations on Foreign Types

impl<T> Length for Option<T>[src]

let mut opt = Some(0);
assert_eq!(cl_traits::Length::length(&opt), 1);
opt.take();
assert_eq!(cl_traits::Length::length(&opt), 0);

type Output = usize

Loading content...

Implementors

impl<'a, T> Length for &'a [T][src]

let structure = cl_traits::doc_tests::slice();
assert_eq!(cl_traits::Length::length(&structure), 3);

type Output = usize

impl<'a, T> Length for &'a mut [T][src]

assert_eq!(cl_traits::Length::length(&&mut [1, 2, 3][..]), 3);

type Output = usize

impl<A> Length for ArrayWrapper<A> where
    A: Array
[src]

let structure = cl_traits::doc_tests::array_wrapper();
assert_eq!(cl_traits::Length::length(&structure), 3);

type Output = usize

Loading content...