pub struct SlugConfig {
pub replacement_delimiter: char,
pub lowercase_enabled: bool,
pub max_slug_chars: Option<usize>,
pub allowed_character_set: AllowedCharacterSet,
pub dot_handling_policy: DotHandlingPolicy,
pub transliteration_policy: TransliterationPolicy,
pub validation_policy: SlugValidationPolicy,
pub empty_output_policy: EmptyOutputPolicy,
}Expand description
Rules used by slugify.
Fields§
§replacement_delimiter: charCharacter inserted for each run of filtered input characters.
lowercase_enabled: boolLowercase the generated slug after delimiter trimming.
max_slug_chars: Option<usize>Maximum number of Unicode scalar values to keep after lowercasing.
allowed_character_set: AllowedCharacterSetCharacter set kept from the input after transliteration.
dot_handling_policy: DotHandlingPolicyHow dots are handled before other filtered characters become delimiters.
transliteration_policy: TransliterationPolicyOptional transliteration applied before character filtering.
validation_policy: SlugValidationPolicyOptional validation applied after empty-output handling.
empty_output_policy: EmptyOutputPolicyBehavior when the generated slug is empty.
Trait Implementations§
Source§impl Clone for SlugConfig
impl Clone for SlugConfig
Source§fn clone(&self) -> SlugConfig
fn clone(&self) -> SlugConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlugConfig
impl Debug for SlugConfig
Source§impl Default for SlugConfig
impl Default for SlugConfig
impl Eq for SlugConfig
Source§impl PartialEq for SlugConfig
impl PartialEq for SlugConfig
impl StructuralPartialEq for SlugConfig
Auto Trait Implementations§
impl Freeze for SlugConfig
impl RefUnwindSafe for SlugConfig
impl Send for SlugConfig
impl Sync for SlugConfig
impl Unpin for SlugConfig
impl UnsafeUnpin for SlugConfig
impl UnwindSafe for SlugConfig
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