pub struct RemoteBlockClient { /* private fields */ }Implementations§
Source§impl RemoteBlockClient
impl RemoteBlockClient
Sourcepub async fn new(remote: impl Borrow<BlockProxy>) -> Result<Self, Status>
pub async fn new(remote: impl Borrow<BlockProxy>) -> Result<Self, Status>
Returns a connection to a remote block device via the given channel.
pub async fn from_session( info: BlockInfo, session: SessionProxy, ) -> Result<Self, Status>
Trait Implementations§
Source§impl BlockClient for RemoteBlockClient
impl BlockClient for RemoteBlockClient
Source§async unsafe fn attach_vmo(&self, vmo: &Vmo) -> Result<VmoId, Status>
async unsafe fn attach_vmo(&self, vmo: &Vmo) -> Result<VmoId, Status>
Wraps AttachVmo from fuchsia.hardware.block::Block. Read more
Source§fn detach_vmo(&self, vmo_id: VmoId) -> impl Future<Output = Result<(), Status>>
fn detach_vmo(&self, vmo_id: VmoId) -> impl Future<Output = Result<(), Status>>
Detaches the given vmo-id from the device.
fn read_at_with_opts_traced( &self, buffer_slice: MutableBufferSlice<'_>, device_offset: u64, opts: ReadOptions, trace_flow_id: u64, ) -> impl Future<Output = Result<(), Status>>
fn write_at_with_opts_traced( &self, buffer_slice: BufferSlice<'_>, device_offset: u64, opts: WriteOptions, trace_flow_id: u64, ) -> impl Future<Output = Result<(), Status>>
fn trim_traced( &self, range: Range<u64>, trace_flow_id: u64, ) -> impl Future<Output = Result<(), Status>>
Source§fn flush_traced(
&self,
trace_flow_id: u64,
) -> impl Future<Output = Result<(), Status>>
fn flush_traced( &self, trace_flow_id: u64, ) -> impl Future<Output = Result<(), Status>>
Sends a flush request to the underlying block device.
Source§fn block_size(&self) -> u32
fn block_size(&self) -> u32
Returns the block size of the device.
Source§fn block_count(&self) -> u64
fn block_count(&self) -> u64
Returns the size, in blocks, of the device.
Source§fn max_transfer_blocks(&self) -> Option<NonZero<u32>>
fn max_transfer_blocks(&self) -> Option<NonZero<u32>>
Returns the maximum number of blocks which can be transferred in a single request.
Source§fn block_flags(&self) -> BlockDeviceFlag
fn block_flags(&self) -> BlockDeviceFlag
Returns the block flags reported by the device.
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Returns true if the remote fifo is still connected.
Source§fn read_at(
&self,
buffer_slice: MutableBufferSlice<'_>,
device_offset: u64,
) -> impl Future<Output = Result<(), Status>> + Send
fn read_at( &self, buffer_slice: MutableBufferSlice<'_>, device_offset: u64, ) -> impl Future<Output = Result<(), Status>> + Send
Reads from the device at |device_offset| into the given buffer slice.
fn read_at_with_opts( &self, buffer_slice: MutableBufferSlice<'_>, device_offset: u64, opts: ReadOptions, ) -> impl Future<Output = Result<(), Status>> + Send
Source§fn write_at(
&self,
buffer_slice: BufferSlice<'_>,
device_offset: u64,
) -> impl Future<Output = Result<(), Status>> + Send
fn write_at( &self, buffer_slice: BufferSlice<'_>, device_offset: u64, ) -> impl Future<Output = Result<(), Status>> + Send
Writes the data in |buffer_slice| to the device.
fn write_at_with_opts( &self, buffer_slice: BufferSlice<'_>, device_offset: u64, opts: WriteOptions, ) -> impl Future<Output = Result<(), Status>> + Send
Source§fn trim(
&self,
device_range: Range<u64>,
) -> impl Future<Output = Result<(), Status>> + Send
fn trim( &self, device_range: Range<u64>, ) -> impl Future<Output = Result<(), Status>> + Send
Trims the given range on the block device.
fn flush(&self) -> impl Future<Output = Result<(), Status>> + Send
Auto Trait Implementations§
impl !Freeze for RemoteBlockClient
impl !RefUnwindSafe for RemoteBlockClient
impl !UnwindSafe for RemoteBlockClient
impl Send for RemoteBlockClient
impl Sync for RemoteBlockClient
impl Unpin for RemoteBlockClient
impl UnsafeUnpin for RemoteBlockClient
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