pub struct Slug(/* private fields */);Expand description
A validated default-separator slug.
Implementations§
Source§impl Slug
impl Slug
Sourcepub fn from_text(input: &str) -> Slug
pub fn from_text(input: &str) -> Slug
Normalizes free-form text into a slug with the default options.
Sourcepub fn from_text_with_options(input: &str, options: SlugOptions) -> Slug
pub fn from_text_with_options(input: &str, options: SlugOptions) -> Slug
Normalizes free-form text into a slug with custom options.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the slug and returns the owned string.
Trait Implementations§
impl Eq for Slug
impl StructuralPartialEq for Slug
Auto Trait Implementations§
impl Freeze for Slug
impl RefUnwindSafe for Slug
impl Send for Slug
impl Sync for Slug
impl Unpin for Slug
impl UnsafeUnpin for Slug
impl UnwindSafe for Slug
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more