pub struct PathConverter {
pub function_name: Option<&'static str>,
pub argument_name: Option<&'static str>,
pub non_strict: bool,
}Expand description
path_converter
Fields§
§function_name: Option<&'static str>Function name for error messages (e.g., “rename”)
argument_name: Option<&'static str>Argument name for error messages (e.g., “src”, “dst”)
non_strict: boolIf true, embedded null characters are allowed
Implementations§
Source§impl PathConverter
impl PathConverter
pub const fn new() -> Self
pub const fn function(self, name: &'static str) -> Self
pub const fn argument(self, name: &'static str) -> Self
pub const fn non_strict(self) -> Self
Sourcepub fn try_path(
&self,
obj: PyObjectRef,
vm: &VirtualMachine,
) -> PyResult<OsPath>
pub fn try_path( &self, obj: PyObjectRef, vm: &VirtualMachine, ) -> PyResult<OsPath>
Convert to OsPath directly
Trait Implementations§
Source§impl Clone for PathConverter
impl Clone for PathConverter
Source§fn clone(&self) -> PathConverter
fn clone(&self) -> PathConverter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PathConverter
impl Default for PathConverter
Source§fn default() -> PathConverter
fn default() -> PathConverter
Returns the “default value” for a type. Read more
impl Copy for PathConverter
Auto Trait Implementations§
impl Freeze for PathConverter
impl RefUnwindSafe for PathConverter
impl Send for PathConverter
impl Sync for PathConverter
impl Unpin for PathConverter
impl UnsafeUnpin for PathConverter
impl UnwindSafe for PathConverter
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> 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