pub struct NameOptions {
pub max_bytes: usize,
pub fallback: &'static str,
}Expand description
How sanitize_file_name_with shapes a name.
Fields§
§max_bytes: usizeLongest result in UTF-8 bytes, clamped to 8..=240. The default, 200, leaves room for a
(9999) collision suffix inside the 255-byte component limit of the common filesystems.
fallback: &'static strReturned when nothing usable is left. Must itself be a safe name; it is sanitised too, and
"download" stands in if it sanitises to nothing.
Trait Implementations§
Source§impl Clone for NameOptions
impl Clone for NameOptions
impl Copy for NameOptions
Source§impl Debug for NameOptions
impl Debug for NameOptions
Source§impl Default for NameOptions
impl Default for NameOptions
impl Eq for NameOptions
Source§impl PartialEq for NameOptions
impl PartialEq for NameOptions
impl StructuralPartialEq for NameOptions
Auto Trait Implementations§
impl Freeze for NameOptions
impl RefUnwindSafe for NameOptions
impl Send for NameOptions
impl Sync for NameOptions
impl Unpin for NameOptions
impl UnsafeUnpin for NameOptions
impl UnwindSafe for NameOptions
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