pub trait AsRawCStream {
// Required method
fn as_raw_c_stream(&self) -> RawCStream;
}Expand description
A trait to extract the raw stream from an underlying object.
Required Methods§
Sourcefn as_raw_c_stream(&self) -> RawCStream
fn as_raw_c_stream(&self) -> RawCStream
Extracts the raw stream.
This function is typically used to borrow an owned stream. When used in this way, this method does not pass ownership of the raw stream to the caller, and the stream is only guaranteed to be valid while the original object has not yet been destroyed.
However, borrowing is not strictly required.
See AsCStream::as_c_stream for an API which strictly borrows a stream.
Implementations on Foreign Types§
Source§impl<T: AsRawCStream + ?Sized> AsRawCStream for &T
impl<T: AsRawCStream + ?Sized> AsRawCStream for &T
fn as_raw_c_stream(&self) -> RawCStream
Source§impl<T: AsRawCStream + ?Sized> AsRawCStream for &mut T
impl<T: AsRawCStream + ?Sized> AsRawCStream for &mut T
fn as_raw_c_stream(&self) -> RawCStream
Source§impl<T: AsRawCStream + ?Sized> AsRawCStream for Box<T>
Available on crate feature alloc only.
impl<T: AsRawCStream + ?Sized> AsRawCStream for Box<T>
Available on crate feature
alloc only.fn as_raw_c_stream(&self) -> RawCStream
Source§impl<T: AsRawCStream + ?Sized> AsRawCStream for Rc<T>
Available on crate feature alloc only.
impl<T: AsRawCStream + ?Sized> AsRawCStream for Rc<T>
Available on crate feature
alloc only.fn as_raw_c_stream(&self) -> RawCStream
Source§impl<T: AsRawCStream + ?Sized> AsRawCStream for Arc<T>
Available on crate feature alloc only.
impl<T: AsRawCStream + ?Sized> AsRawCStream for Arc<T>
Available on crate feature
alloc only.fn as_raw_c_stream(&self) -> RawCStream
Implementors§
impl AsRawCStream for BorrowedCStream<'_>
impl AsRawCStream for BufferedCStream
Available on crate feature
alloc only.