Skip to main content

Sequence

Trait Sequence 

pub trait Sequence {
    // Required method
    fn count(&self) -> usize;
}
Expand description

A value that a length prefix counts.

The prefix counts the bytes of a string and the elements of an array.

Required Methods§

fn count(&self) -> usize

Returns the value of the length prefix.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

§

impl Sequence for str

§

fn count(&self) -> usize

§

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

§

fn count(&self) -> usize

§

impl<T: Sequence + ?Sized> Sequence for &T

§

fn count(&self) -> usize

§

impl<T> Sequence for [T]

§

fn count(&self) -> usize

Implementors§

§

impl Sequence for Bytes

§

impl Sequence for Utf8Bytes

§

impl<T> Sequence for Items<T>