pub struct StderrOverride;Expand description
Override the File Descriptor safely. For more information please see the module-level documentation
Implementations§
Source§impl StderrOverride
impl StderrOverride
Sourcepub fn override_file<P: AsRef<Path>>(p: P) -> Result<StderrOverrideGuard>
pub fn override_file<P: AsRef<Path>>(p: P) -> Result<StderrOverrideGuard>
Override the File Descriptor by providing a path.
This uses OpenOptions with create(true) so it will fail/succeed accordingly.
(won’t fail if the fail already exists and will create it if it doesn’t exist.)
Sourcepub fn override_raw<FD: AsRawFd>(fd: FD) -> Result<StderrOverrideGuard>
pub fn override_raw<FD: AsRawFd>(fd: FD) -> Result<StderrOverrideGuard>
Override the File Descriptor by providing something that can be turned into a file descriptor.
This will accept Sockets, Files, and even Stdio’s. AsRawFd
Auto Trait Implementations§
impl Freeze for StderrOverride
impl RefUnwindSafe for StderrOverride
impl Send for StderrOverride
impl Sync for StderrOverride
impl Unpin for StderrOverride
impl UnwindSafe for StderrOverride
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