Skip to main content

NameSlice

Trait NameSlice 

Source
trait NameSlice<T>{
    // Required methods
    fn contains_item<S: NameMember>(&self, other: &S) -> bool;
    fn has_duplicates(&self) -> bool;
    fn is_intersection_non_empty<S>(&self, others: &[S]) -> bool
       where S: NameMember + Canonicalization + Clone;
}
Expand description

Supporting algorithms on lists of elements and lists of attributes, from the specification.

Required Methods§

Source

fn contains_item<S: NameMember>(&self, other: &S) -> bool

Source

fn has_duplicates(&self) -> bool

Source

fn is_intersection_non_empty<S>(&self, others: &[S]) -> bool

Custom version of the supporting algorithm https://wicg.github.io/sanitizer-api/#sanitizerconfig-intersection that checks whether the intersection is non-empty, returning early if it is non-empty for efficiency.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> NameSlice<T> for [T]

Source§

fn contains_item<S: NameMember>(&self, other: &S) -> bool

Source§

fn has_duplicates(&self) -> bool

Source§

fn is_intersection_non_empty<S>(&self, others: &[S]) -> bool

Custom version of the supporting algorithm https://wicg.github.io/sanitizer-api/#sanitizerconfig-intersection that checks whether the intersection is non-empty, returning early if it is non-empty for efficiency.

Implementors§