pub struct InvalidPathsBuilder { /* private fields */ }
Expand description
Builder for InvalidPaths
.
Implementations§
Source§impl InvalidPathsBuilder
impl InvalidPathsBuilder
Sourcepub fn invalid_characters<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn invalid_characters<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Characters not allowed within a filename.
In addition to whitespace, control, and non-ASCII characters, which are always disallowed.
Configuration: Optional Default: `String::new()
Sourcepub fn allow_space(&mut self, value: bool) -> &mut Self
pub fn allow_space(&mut self, value: bool) -> &mut Self
Allow the space character (ASCII x20)
This allows for exempting
in paths.
Configuration: Optional
Default: false
Sourcepub fn enforce_windows_rules(&mut self, value: bool) -> &mut Self
pub fn enforce_windows_rules(&mut self, value: bool) -> &mut Self
Enforce Windows-specific path rules.
This includes a list of reserved names as well as rejecting path components which end in
.
or
(space).
Configuration: Optional
Default: false
Sourcepub fn build(&self) -> Result<InvalidPaths, InvalidPathsBuilderError>
pub fn build(&self) -> Result<InvalidPaths, InvalidPathsBuilderError>
Trait Implementations§
Source§impl Clone for InvalidPathsBuilder
impl Clone for InvalidPathsBuilder
Source§fn clone(&self) -> InvalidPathsBuilder
fn clone(&self) -> InvalidPathsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for InvalidPathsBuilder
impl RefUnwindSafe for InvalidPathsBuilder
impl Send for InvalidPathsBuilder
impl Sync for InvalidPathsBuilder
impl Unpin for InvalidPathsBuilder
impl UnwindSafe for InvalidPathsBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more