Struct fuchsia_fs::file::Adapter
source · pub struct Adapter<T> { /* private fields */ }
Expand description
Adapter to implement AsyncReadAt + AsyncGetSize for AsyncRead + AsyncSeek.
Implementations§
Trait Implementations§
source§impl<T: AsyncSeek + Unpin> AsyncGetSize for Adapter<T>
impl<T: AsyncSeek + Unpin> AsyncGetSize for Adapter<T>
source§impl<T: AsyncRead + AsyncSeek + Unpin> AsyncReadAt for Adapter<T>
impl<T: AsyncRead + AsyncSeek + Unpin> AsyncReadAt for Adapter<T>
source§fn poll_read_at(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
offset: u64,
buf: &mut [u8],
) -> Poll<Result<usize>>
fn poll_read_at( self: Pin<&mut Self>, cx: &mut Context<'_>, offset: u64, buf: &mut [u8], ) -> Poll<Result<usize>>
Attempt to read at most
buf.len()
bytes starting at offset
into buf
. On success
returns the number of bytes read.
Contents of buf
are only altered on success.
Reads of more than zero but fewer than buf.len()
bytes do NOT indicate EOF.
Reads of zero bytes only occur if buf.len() == 0
or EOF.Auto Trait Implementations§
impl<T> Freeze for Adapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for Adapter<T>where
T: RefUnwindSafe,
impl<T> Send for Adapter<T>where
T: Send,
impl<T> Sync for Adapter<T>where
T: Sync,
impl<T> Unpin for Adapter<T>where
T: Unpin,
impl<T> UnwindSafe for Adapter<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> AsyncGetSizeExt for Twhere
T: AsyncGetSize + ?Sized,
impl<T> AsyncGetSizeExt for Twhere
T: AsyncGetSize + ?Sized,
source§impl<T> AsyncReadAtExt for Twhere
T: AsyncReadAt + ?Sized,
impl<T> AsyncReadAtExt for Twhere
T: AsyncReadAt + ?Sized,
source§fn read_at<'a>(&'a mut self, offset: u64, buf: &'a mut [u8]) -> ReadAt<'a, Self>where
Self: Unpin,
fn read_at<'a>(&'a mut self, offset: u64, buf: &'a mut [u8]) -> ReadAt<'a, Self>where
Self: Unpin,
Returns a future that reads at
offset
, and fill buf
, on success the number of bytes
read is returned.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