Struct io_extras::raw::RawWriteable
source · [−]#[repr(transparent)]pub struct RawWriteable(_);
Expand description
A non-owning unsafe I/O handle that implements Write
. Write
functions
considered are safe, so this type requires unsafe
to construct.
This doesn’t implement Into*
or From*
traits.
Platform-specific behavior
On Posix-ish platforms, this writes to the handle as if it were a
File
. On Windows, this writes to a file-like handle as if it were a
File
, and to a socket-like handle as if it were a TcpStream
.
Trait Implementations
sourceimpl AsRawFd for RawWriteable
impl AsRawFd for RawWriteable
RawWriteable
doesn’t own its handle.
sourceimpl Clone for RawWriteable
impl Clone for RawWriteable
sourcefn clone(&self) -> RawWriteableⓘNotable traits for RawWriteableimpl Write for RawWriteable
fn clone(&self) -> RawWriteableⓘNotable traits for RawWriteableimpl Write for RawWriteable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RawWriteable
impl Debug for RawWriteable
sourceimpl FromRawFd for RawWriteable
impl FromRawFd for RawWriteable
RawWriteable
doesn’t own its handle.
sourceunsafe fn from_raw_fd(raw_fd: RawFd) -> Self
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self
Constructs a new instance of Self
from the given raw file
descriptor. Read more
sourceimpl IntoRawFd for RawWriteable
impl IntoRawFd for RawWriteable
RawWriteable
doesn’t own its handle.
sourcefn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more
sourceimpl Write for RawWriteable
impl Write for RawWriteable
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
sourcefn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl Copy for RawWriteable
Auto Trait Implementations
impl RefUnwindSafe for RawWriteable
impl Send for RawWriteable
impl Sync for RawWriteable
impl Unpin for RawWriteable
impl UnwindSafe for RawWriteable
Blanket Implementations
sourceimpl<T> AsRawFilelike for T where
T: AsRawFd,
impl<T> AsRawFilelike for T where
T: AsRawFd,
sourcefn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Returns the raw value.
sourceimpl<T> AsRawGrip for T where
T: AsRawFd,
impl<T> AsRawGrip for T where
T: AsRawFd,
sourcefn as_raw_grip(&self) -> i32
fn as_raw_grip(&self) -> i32
Extracts the raw grip.
sourceimpl<T> AsRawSocketlike for T where
T: AsRawFd,
impl<T> AsRawSocketlike for T where
T: AsRawFd,
sourcefn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Returns the raw value.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromRawFilelike for T where
T: FromRawFd,
impl<T> FromRawFilelike for T where
T: FromRawFd,
sourceunsafe fn from_raw_filelike(raw: i32) -> T
unsafe fn from_raw_filelike(raw: i32) -> T
Constructs Self
from the raw value. Read more
sourceimpl<T> FromRawGrip for T where
T: FromRawFd,
impl<T> FromRawGrip for T where
T: FromRawFd,
sourceunsafe fn from_raw_grip(raw_grip: i32) -> T
unsafe fn from_raw_grip(raw_grip: i32) -> T
Consume an RawGrip
and convert into a Self
. Read more
sourceimpl<T> FromRawSocketlike for T where
T: FromRawFd,
impl<T> FromRawSocketlike for T where
T: FromRawFd,
sourceunsafe fn from_raw_socketlike(raw: i32) -> T
unsafe fn from_raw_socketlike(raw: i32) -> T
Constructs Self
from the raw value. Read more
sourceimpl<T> IntoRawFilelike for T where
T: IntoRawFd,
impl<T> IntoRawFilelike for T where
T: IntoRawFd,
sourcefn into_raw_filelike(self) -> i32
fn into_raw_filelike(self) -> i32
Returns the raw value.
sourceimpl<T> IntoRawGrip for T where
T: IntoRawFd,
impl<T> IntoRawGrip for T where
T: IntoRawFd,
sourcefn into_raw_grip(self) -> i32
fn into_raw_grip(self) -> i32
Consume self
and convert into an RawGrip
.
sourceimpl<T> IntoRawSocketlike for T where
T: IntoRawFd,
impl<T> IntoRawSocketlike for T where
T: IntoRawFd,
sourcefn into_raw_socketlike(self) -> i32
fn into_raw_socketlike(self) -> i32
Returns the raw value.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more