Trait similar::DiffableStrRef
source · pub trait DiffableStrRef {
type Output: DiffableStr + ?Sized;
// Required method
fn as_diffable_str(&self) -> &Self::Output;
}
Expand description
Reference to a DiffableStr
.
This type exists because while the library only really provides ways to
work with &str
and &[u8]
there are types that deref into those string
slices such as String
and Vec<u8>
.
This trait is used in the library whenever it’s nice to be able to pass strings of different types in.
Requires the text
feature.
Required Associated Types§
sourcetype Output: DiffableStr + ?Sized
type Output: DiffableStr + ?Sized
The type of the resolved DiffableStr
.
Required Methods§
sourcefn as_diffable_str(&self) -> &Self::Output
fn as_diffable_str(&self) -> &Self::Output
Resolves the reference.