Struct tor_persist::slug::SlugRef
source · pub struct SlugRef(/* private fields */);
Expand description
A borrwed slug, checked for syntax
The syntax check can be relied on for safety/soundness.
Implementations§
source§impl SlugRef
impl SlugRef
sourcepub fn new(s: &str) -> Result<&SlugRef, BadSlug>
pub fn new(s: &str) -> Result<&SlugRef, BadSlug>
Make a SlugRef out of a str
, if it has the correct syntax
sourcepub unsafe fn new_unchecked<'s>(s: &'s str) -> &'s SlugRef
pub unsafe fn new_unchecked<'s>(s: &'s str) -> &'s SlugRef
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.
Trait Implementations§
source§impl<'i> AsRef<&'i SlugRef> for InstancePurgeInfo<'i>
Available on crate feature state-dir
only.
impl<'i> AsRef<&'i SlugRef> for InstancePurgeInfo<'i>
Available on crate feature
state-dir
only.source§impl PartialEq for SlugRef
impl PartialEq for SlugRef
source§impl PartialOrd for SlugRef
impl PartialOrd for SlugRef
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more