Struct uucore::io::OwnedFileDescriptorOrHandle
source · pub struct OwnedFileDescriptorOrHandle { /* private fields */ }
Expand description
abstraction wrapper for native file handle / file descriptor
Implementations§
source§impl OwnedFileDescriptorOrHandle
impl OwnedFileDescriptorOrHandle
sourcepub fn open_file(options: &OpenOptions, path: &Path) -> Result<Self>
pub fn open_file(options: &OpenOptions, path: &Path) -> Result<Self>
create by opening a file
sourcepub fn from<T: AsFd>(t: T) -> Result<Self>
pub fn from<T: AsFd>(t: T) -> Result<Self>
conversion from borrowed native type
e.g. std::io::stdout()
, std::fs::File
, …
sourcepub fn into_stdio(self) -> Stdio
pub fn into_stdio(self) -> Stdio
instantiates a corresponding Stdio
Trait Implementations§
source§impl From<OwnedFileDescriptorOrHandle> for Stdio
impl From<OwnedFileDescriptorOrHandle> for Stdio
instantiates a corresponding Stdio
source§fn from(value: OwnedFileDescriptorOrHandle) -> Self
fn from(value: OwnedFileDescriptorOrHandle) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OwnedFileDescriptorOrHandle
impl RefUnwindSafe for OwnedFileDescriptorOrHandle
impl Send for OwnedFileDescriptorOrHandle
impl Sync for OwnedFileDescriptorOrHandle
impl Unpin for OwnedFileDescriptorOrHandle
impl UnwindSafe for OwnedFileDescriptorOrHandle
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