Struct rustpython_vm::stdlib::os::OsPath
source · pub struct OsPath {
pub path: OsString,
/* private fields */
}
Fields§
§path: OsString
Implementations§
source§impl OsPath
impl OsPath
pub fn new_str(path: impl Into<OsString>) -> Self
pub fn as_path(&self) -> &Path
pub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_cstring(self, vm: &VirtualMachine) -> PyResult<CString>
pub fn to_widecstring(&self, vm: &VirtualMachine) -> PyResult<WideCString>
pub fn filename(&self, vm: &VirtualMachine) -> PyResult
Trait Implementations§
source§impl TryFromObject for OsPath
impl TryFromObject for OsPath
source§fn try_from_object(vm: &VirtualMachine, obj: PyObjectRef) -> PyResult<Self>
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§
impl Freeze for OsPath
impl RefUnwindSafe for OsPath
impl Send for OsPath
impl Sync for OsPath
impl Unpin for OsPath
impl UnwindSafe for OsPath
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> FromArgOptional for Twhere
T: TryFromObject,
impl<T> FromArgOptional for Twhere
T: TryFromObject,
type Inner = T
fn from_inner(x: T) -> T
source§impl<T> FromArgs for Twhere
T: TryFromObject,
impl<T> FromArgs for Twhere
T: TryFromObject,
source§fn arity() -> RangeInclusive<usize>
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>
fn from_args( vm: &VirtualMachine, args: &mut FuncArgs ) -> Result<T, ArgumentError>
Extracts this item from the next argument(s).