Skip to main content

Collection

Trait Collection 

Source
pub trait Collection {
    // Required methods
    fn count(&self) -> Count;
    fn as_datatype(&self) -> DatatypeRef;
}
Expand description

Something with a known element count and datatype. The common supertrait of Buffer and BufferMut.

Required Methods§

Source

fn count(&self) -> Count

Number of elements.

Source

fn as_datatype(&self) -> DatatypeRef

The datatype of the elements.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

impl<T: Equivalence> Collection for [T]

Implementors§