vstr

Type Alias vstr 

Source
pub type vstr<Rule> = VStr<Rule>;
Expand description

Create a validated string slice.

See VStr for more information.

Aliased Type§

pub struct vstr<Rule> { /* private fields */ }

Trait Implementations§

Source§

impl<R: ValidateString> ToOwned for vstr<R>

Available on crate feature alloc only.
Source§

type Owned = Box<VStr<R>>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<'a: 'b, 'b, R: ValidateString> TryFrom<&'a VCow<'b, R>> for &'b vstr<R>

Available on crate feature cow only.
Source§

type Error = <R as ValidateString>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(cow: &'a VCow<'b, R>) -> Result<Self, Self::Error>

Performs the conversion.