Struct fidl_fuchsia_hardware_block::BlockProxy
source · pub struct BlockProxy { /* private fields */ }
Implementations§
source§impl BlockProxy
impl BlockProxy
sourcepub fn take_event_stream(&self) -> BlockEventStream
pub fn take_event_stream(&self) -> BlockEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn get_info(&self) -> QueryResponseFut<BlockGetInfoResult>
pub fn get_info(&self) -> QueryResponseFut<BlockGetInfoResult>
Get information about the underlying block device.
sourcepub fn get_stats(&self, clear: bool) -> QueryResponseFut<BlockGetStatsResult>
pub fn get_stats(&self, clear: bool) -> QueryResponseFut<BlockGetStatsResult>
Returns stats about block device operations. Setting clear
will reset stats counters.
sourcepub fn open_session(
&self,
session: ServerEnd<SessionMarker>
) -> Result<(), Error>
pub fn open_session( &self, session: ServerEnd<SessionMarker> ) -> Result<(), Error>
Opens a new FIFO-based session on the block device.
sourcepub fn read_blocks(
&self,
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64
) -> QueryResponseFut<BlockReadBlocksResult>
pub fn read_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> QueryResponseFut<BlockReadBlocksResult>
Reads from a block device.
This read does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.
sourcepub fn write_blocks(
&self,
vmo: Vmo,
length: u64,
dev_offset: u64,
vmo_offset: u64
) -> QueryResponseFut<BlockWriteBlocksResult>
pub fn write_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> QueryResponseFut<BlockWriteBlocksResult>
Writes to a block device.
This write does not require exclusive access. length, dev_offset and vmo_offset are specified in bytes, but they must be block-aligned. This method is provided for backward compatibility, and is not intended for new code. New code should use the FIFO interface along with the client libraries to read and write from block devices.
Trait Implementations§
source§impl BlockProxyInterface for BlockProxy
impl BlockProxyInterface for BlockProxy
type GetInfoResponseFut = QueryResponseFut<Result<BlockInfo, i32>>
fn get_info(&self) -> Self::GetInfoResponseFut
type GetStatsResponseFut = QueryResponseFut<Result<BlockStats, i32>>
fn get_stats(&self, clear: bool) -> Self::GetStatsResponseFut
fn open_session(&self, session: ServerEnd<SessionMarker>) -> Result<(), Error>
type ReadBlocksResponseFut = QueryResponseFut<Result<(), i32>>
fn read_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> Self::ReadBlocksResponseFut
type WriteBlocksResponseFut = QueryResponseFut<Result<(), i32>>
fn write_blocks( &self, vmo: Vmo, length: u64, dev_offset: u64, vmo_offset: u64 ) -> Self::WriteBlocksResponseFut
source§impl Clone for BlockProxy
impl Clone for BlockProxy
source§fn clone(&self) -> BlockProxy
fn clone(&self) -> BlockProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BlockProxy
impl Debug for BlockProxy
source§impl Proxy for BlockProxy
impl Proxy for BlockProxy
§type Protocol = BlockMarker
type Protocol = BlockMarker
Proxy
controls.