Trait StrCompare

Source
pub trait StrCompare: 'static {
    // Required method
    fn compare(a: &str, b: &str) -> bool;
}
Expand description

Defines an interface for comparing two strings for equality.

This is used to allow StrCursor to be parametrised on different kinds of string comparisons: case-sensitive, case-insensitive, canonicalising, etc.

Required Methods§

Source

fn compare(a: &str, b: &str) -> bool

Compare two strings and return true if they should be considered “equal”.

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.

Implementors§