Struct SlugRef
Source #[repr(transparent)]
pub struct SlugRef(str);
Expand description
A borrwed slug, checked for syntax
The syntax check can be relied on for safety/soundness.
Make a SlugRef out of a str
, if it has the correct syntax
Make a SlugRef out of a str
, without checking the syntax
§Safety
It’s the caller’s responsibility to check the syntax of the input string.
Obtain this slug as a str
Obtain this slug as a Path
Source§Available on crate feature state-dir
only.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more
Serialize this value into the given Serde serializer.
Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Converts the given value to a
String
.
Read more
Convert self
into a Slug
, if it has the right syntax