pub trait Chain: Signal<usize> {
// Required method
fn len(&self) -> usize;
// Provided methods
fn first(&self) -> Option<Self::Output> { ... }
fn last(&self) -> Option<Self::Output> { ... }
fn is_empty(&self) -> bool { ... }
fn into_iter(self) -> IntoIter<Self>
where Self: Sized { ... }
fn iter(&self) -> IntoIter<&Self> { ... }
fn repeat(self) -> Repeat<Self>
where Self: Sized { ... }
}Expand description
Required Methods§
Provided Methods§
Sourcefn first(&self) -> Option<Self::Output>
fn first(&self) -> Option<Self::Output>
Returns the first element of the signal, or None if it is empty.
Sourcefn last(&self) -> Option<Self::Output>
fn last(&self) -> Option<Self::Output>
Returns the last element of the signal, or None if it is empty.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.