Struct rustpython_vm::stdlib::os::OsPath

source ·
pub struct OsPath {
    pub path: OsString,
    /* private fields */
}

Fields§

§path: OsString

Implementations§

source§

impl OsPath

source

pub fn new_str(path: impl Into<OsString>) -> Self

source

pub fn as_path(&self) -> &Path

source

pub fn into_bytes(self) -> Vec<u8>

source

pub fn into_cstring(self, vm: &VirtualMachine) -> PyResult<CString>

source

pub fn to_widecstring(&self, vm: &VirtualMachine) -> PyResult<WideCString>

source

pub fn filename(&self, vm: &VirtualMachine) -> PyResult

Trait Implementations§

source§

impl AsRef<Path> for OsPath

source§

fn as_ref(&self) -> &Path

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for OsPath

source§

fn clone(&self) -> OsPath

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl TryFromObject for OsPath

source§

fn try_from_object(vm: &VirtualMachine, obj: PyObjectRef) -> PyResult<Self>

Attempt to convert a Python object to a value of this type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> ExactFrom<T> for Uwhere U: TryFrom<T>,

§

fn exact_from(value: T) -> U

§

impl<T, U> ExactInto<U> for Twhere U: ExactFrom<T>,

§

fn exact_into(self) -> U

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromArgOptional for Twhere T: TryFromObject,

§

type Inner = T

source§

fn from_inner(x: T) -> T

source§

impl<T> FromArgs for Twhere T: TryFromObject,

source§

fn arity() -> RangeInclusive<usize>

The range of positional arguments permitted by the function signature. Read more
source§

fn from_args( vm: &VirtualMachine, args: &mut FuncArgs ) -> Result<T, ArgumentError>

Extracts this item from the next argument(s).
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> OverflowingInto<U> for Twhere U: OverflowingFrom<T>,

§

fn overflowing_into(self) -> (U, bool)

§

impl<T, U> RoundingInto<U> for Twhere U: RoundingFrom<T>,

§

fn rounding_into(self, rm: RoundingMode) -> U

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T, U> SaturatingInto<U> for Twhere U: SaturatingFrom<T>,

§

fn saturating_into(self) -> U

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T, U> WrappingInto<U> for Twhere U: WrappingFrom<T>,

§

fn wrapping_into(self) -> U

source§

impl<T> PyThreadingConstraint for T