Struct unsafe_io::UnsafeWriteable [−][src]
#[repr(transparent)]pub struct UnsafeWriteable(_);
Expand description
A non-owning unsafe I/O handle that implements Write. Write functions
considered are safe, so this type requires unsafe to construct.
Like UnsafeHandle, 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
impl AsRawFd for UnsafeWriteable[src]
impl AsRawFd for UnsafeWriteable[src]UnsafeWriteable doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
impl Clone for UnsafeWriteable[src]
impl Clone for UnsafeWriteable[src]fn clone(&self) -> UnsafeWriteableⓘNotable traits for UnsafeWriteable
impl Write for UnsafeWriteable[src]
fn clone(&self) -> UnsafeWriteableⓘNotable traits for UnsafeWriteable
impl Write for UnsafeWriteable[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for UnsafeWriteable[src]
impl Debug for UnsafeWriteable[src]impl FromRawFd for UnsafeWriteable[src]
impl FromRawFd for UnsafeWriteable[src]UnsafeWriteable doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self[src]
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self[src]Constructs a new instance of Self from the given raw file
descriptor. Read more
impl FromUnsafeHandle for UnsafeWriteable[src]
impl FromUnsafeHandle for UnsafeWriteable[src]UnsafeWriteable doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
unsafe fn from_unsafe_handle(unsafe_handle: UnsafeHandle) -> Self[src]
unsafe fn from_unsafe_handle(unsafe_handle: UnsafeHandle) -> Self[src]Constructs a new instance of Self from the given unsafe handle. Read more
impl IntoRawFd for UnsafeWriteable[src]
impl IntoRawFd for UnsafeWriteable[src]UnsafeWriteable doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
fn into_raw_fd(self) -> RawFd[src]
fn into_raw_fd(self) -> RawFd[src]Consumes this object, returning the raw underlying file descriptor. Read more
impl Write for UnsafeWriteable[src]
impl Write for UnsafeWriteable[src]fn write(&mut self, buf: &[u8]) -> Result<usize>[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>[src]Write a buffer into this writer, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>[src]
fn flush(&mut self) -> Result<()>[src]Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn is_write_vectored(&self) -> bool[src]
fn is_write_vectored(&self) -> bool[src]can_vector)Determines if this Writer has an efficient write_vectored
implementation. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<()>[src]
fn write_all(&mut self, buf: &[u8]) -> Result<()>[src]Attempts to write an entire buffer into this writer. Read more
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>[src]
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>[src]write_all_vectored)Attempts to write multiple buffers into this writer. Read more
impl Copy for UnsafeWriteable[src]
Auto Trait Implementations
impl RefUnwindSafe for UnsafeWriteable
impl Send for UnsafeWriteable
impl Sync for UnsafeWriteable
impl Unpin for UnsafeWriteable
impl UnwindSafe for UnsafeWriteable
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more