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, DefaultFuchsiaResourceDialect>
pub fn get_info( &self, ) -> QueryResponseFut<BlockGetInfoResult, DefaultFuchsiaResourceDialect>
Get information about the underlying block device.
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 open_session_with_offset_map(
&self,
session: ServerEnd<SessionMarker>,
mapping: &BlockOffsetMapping,
) -> Result<(), Error>
pub fn open_session_with_offset_map( &self, session: ServerEnd<SessionMarker>, mapping: &BlockOffsetMapping, ) -> Result<(), Error>
Opens a new FIFO-based session on the block device, providing a mapping which is transparently applied to device offsets in block FIFO requests.
This interface is intended to be used internally between nested Block implementations, in order to provide passthrough I/O. For example, a fixed partition map (e.g. GPT) will serve a Block protocol for each partition, and will respond to OpenSession requests by calling OpenSessionWithOffsetMap on the underlying block device, establishing itself as the source for translating client block offsets (relative to the partition start) to absolute offsets. The client can then communicate directly with the underlying block device, and the partition offsets can be transparently applied to requests.
Trait Implementations§
Source§impl BlockProxyInterface for BlockProxy
impl BlockProxyInterface for BlockProxy
type GetInfoResponseFut = QueryResponseFut<Result<BlockInfo, i32>>
fn get_info(&self) -> Self::GetInfoResponseFut
fn open_session(&self, session: ServerEnd<SessionMarker>) -> Result<(), Error>
fn open_session_with_offset_map( &self, session: ServerEnd<SessionMarker>, mapping: &BlockOffsetMapping, ) -> Result<(), Error>
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
Source§type Protocol = BlockMarker
type Protocol = BlockMarker
Proxy
controls.