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§
Sourcefn length_property(&self) -> usize
fn length_property(&self) -> usize
Returns the length of a collection-like value.
Implementations on Foreign Types§
Source§impl LengthProperty for &str
impl LengthProperty for &str
fn length_property(&self) -> usize
Source§impl LengthProperty for &CStr
impl LengthProperty for &CStr
fn length_property(&self) -> usize
Source§impl LengthProperty for &OsStr
Available on crate feature std only.
impl LengthProperty for &OsStr
Available on crate feature
std only.fn length_property(&self) -> usize
Source§impl LengthProperty for CString
impl LengthProperty for CString
fn length_property(&self) -> usize
Source§impl LengthProperty for String
impl LengthProperty for String
fn length_property(&self) -> usize
Source§impl LengthProperty for OsString
Available on crate feature std only.
impl LengthProperty for OsString
Available on crate feature
std only.fn length_property(&self) -> usize
Source§impl<K, V> LengthProperty for BTreeMap<K, V>
impl<K, V> LengthProperty for BTreeMap<K, V>
fn length_property(&self) -> usize
Source§impl<K, V, S> LengthProperty for HashMap<K, V, S>
Available on crate feature std only.
impl<K, V, S> LengthProperty for HashMap<K, V, S>
Available on crate feature
std only.fn length_property(&self) -> usize
Source§impl<K, V, S> LengthProperty for HashMap<K, V, S>
impl<K, V, S> LengthProperty for HashMap<K, V, S>
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for &[T]
impl<T> LengthProperty for &[T]
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for &Twhere
T: LengthProperty + ?Sized,
impl<T> LengthProperty for &Twhere
T: LengthProperty + ?Sized,
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for &mut Twhere
T: LengthProperty + ?Sized,
impl<T> LengthProperty for &mut Twhere
T: LengthProperty + ?Sized,
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for BinaryHeap<T>
impl<T> LengthProperty for BinaryHeap<T>
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for BTreeSet<T>
impl<T> LengthProperty for BTreeSet<T>
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for LinkedList<T>
impl<T> LengthProperty for LinkedList<T>
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for VecDeque<T>
impl<T> LengthProperty for VecDeque<T>
fn length_property(&self) -> usize
Source§impl<T> LengthProperty for Vec<T>
impl<T> LengthProperty for Vec<T>
fn length_property(&self) -> usize
Source§impl<T, S> LengthProperty for HashSet<T, S>
Available on crate feature std only.
impl<T, S> LengthProperty for HashSet<T, S>
Available on crate feature
std only.