LengthProperty

Trait LengthProperty 

Source
pub trait LengthProperty {
    // Required method
    fn length_property(&self) -> usize;
}
Expand description

The length property of a collection-like type.

Collection-like types are, for example, Vec, slice, array, HashSet, HashMap and strings.

This property is used by the implementation of the AssertHasLength assertion.

Required Methods§

Source

fn length_property(&self) -> usize

Returns the length of a collection-like value.

Implementations on Foreign Types§

Source§

impl LengthProperty for &str

Source§

impl LengthProperty for &CStr

Source§

impl LengthProperty for &OsStr

Available on crate feature std only.
Source§

impl LengthProperty for CString

Source§

impl LengthProperty for String

Source§

impl LengthProperty for OsString

Available on crate feature std only.
Source§

impl<K, V> LengthProperty for BTreeMap<K, V>

Source§

impl<K, V, S> LengthProperty for HashMap<K, V, S>

Available on crate feature std only.
Source§

impl<K, V, S> LengthProperty for HashMap<K, V, S>

Source§

impl<T> LengthProperty for &[T]

Source§

impl<T> LengthProperty for &T
where T: LengthProperty + ?Sized,

Source§

impl<T> LengthProperty for &mut T
where T: LengthProperty + ?Sized,

Source§

impl<T> LengthProperty for BinaryHeap<T>

Source§

impl<T> LengthProperty for BTreeSet<T>

Source§

impl<T> LengthProperty for LinkedList<T>

Source§

impl<T> LengthProperty for VecDeque<T>

Source§

impl<T> LengthProperty for Vec<T>

Source§

impl<T, S> LengthProperty for HashSet<T, S>

Available on crate feature std only.
Source§

impl<T, S> LengthProperty for HashSet<T, S>

Source§

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

Implementors§