pub struct OwnedCStream { /* private fields */ }
Expand description
An owned RawCStream
.
This libc::fclose
s the stream on drop.
It is guaranteed that nobody else will close the stream.
This uses #[repr(transparent)]
and has the representation of a host stream,
so it can be used in FFI in places where a stream is passed as a consumed argument
or returned as an owned value, and it never has the value NULL
.
Trait Implementations§
Source§impl AsCStream for OwnedCStream
impl AsCStream for OwnedCStream
Source§fn as_c_stream(&self) -> BorrowedCStream<'_>
fn as_c_stream(&self) -> BorrowedCStream<'_>
Borrows the stream.
Source§impl AsRawCStream for OwnedCStream
impl AsRawCStream for OwnedCStream
Source§fn as_raw_c_stream(&self) -> RawCStream
fn as_raw_c_stream(&self) -> RawCStream
Extracts the raw stream. Read more
Source§impl Debug for OwnedCStream
impl Debug for OwnedCStream
Source§impl Drop for OwnedCStream
impl Drop for OwnedCStream
Source§impl FromRawCStream for OwnedCStream
impl FromRawCStream for OwnedCStream
Source§unsafe fn from_raw_c_stream(raw: RawCStream) -> Self
unsafe fn from_raw_c_stream(raw: RawCStream) -> Self
Constructs a new instance of
Self
from the given raw stream. Read moreSource§impl IntoRawCStream for OwnedCStream
impl IntoRawCStream for OwnedCStream
Source§fn into_raw_c_stream(self) -> RawCStream
fn into_raw_c_stream(self) -> RawCStream
Consumes this object, returning the raw underlying stream. Read more
Auto Trait Implementations§
impl Freeze for OwnedCStream
impl RefUnwindSafe for OwnedCStream
impl !Send for OwnedCStream
impl !Sync for OwnedCStream
impl Unpin for OwnedCStream
impl UnwindSafe for OwnedCStream
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