Skip to main content

HasLength

Trait HasLength 

Source
pub trait HasLength {
    // Required method
    fn length(&self) -> usize;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn is_not_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn length(&self) -> usize

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn is_not_empty(&self) -> bool

Implementations on Foreign Types§

Source§

impl HasLength for &str

Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl HasLength for &String

Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl HasLength for String

Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl HasLength for Range<i8>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<i16>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<i32>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<i64>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<u8>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<u16>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<u32>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<u64>

Source§

fn length(&self) -> usize

Source§

impl HasLength for Range<usize>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<i8>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<i16>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<i32>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<i64>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<u8>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<u16>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<u32>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<u64>

Source§

fn length(&self) -> usize

Source§

impl HasLength for RangeInclusive<usize>

Source§

fn length(&self) -> usize

Source§

impl<K: Debug, V: Debug, S: BuildHasher> HasLength for &HashMap<K, V, S>

Available on crate feature std only.
Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<K: Debug, V: Debug, S: BuildHasher> HasLength for HashMap<K, V, S>

Available on crate feature std only.
Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> HasLength for &[T]

Source§

fn length(&self) -> usize

Source§

impl<T> HasLength for &Vec<T>

Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T> HasLength for Vec<T>

Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<T, const S: usize> HasLength for [T; S]

Source§

fn length(&self) -> usize

Source§

impl<V: Debug, S: BuildHasher> HasLength for &HashSet<V, S>

Available on crate feature std only.
Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

impl<V: Debug, S: BuildHasher> HasLength for HashSet<V, S>

Available on crate feature std only.
Source§

fn length(&self) -> usize

Source§

fn is_empty(&self) -> bool

Implementors§