Sequence

Trait Sequence 

Source
pub trait Sequence {
    // Required method
    fn has_seq(&self, seq: &Self) -> bool;
}
Expand description

Trait for working with sequences. I only kept Vector in mind.

Required Methods§

Source

fn has_seq(&self, seq: &Self) -> bool

Does it contain a sub sequence?

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.

Implementations on Foreign Types§

Source§

impl<T: PartialEq> Sequence for Vec<T>

Source§

fn has_seq(&self, seq: &Self) -> bool

§Example
use fnrs::Sequence;
assert_eq!(vec![1,2,1,3,5,9,0].has_seq(&vec![1,3,5]), true);
assert_eq!(vec![1,2,1,3,5,9,0].has_seq(&vec![1,3,5,8]), false);

Implementors§