pub struct SessionProxy { /* private fields */ }Implementations§
Source§impl SessionProxy
impl SessionProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.storage.block/Session.
Sourcepub fn take_event_stream(&self) -> SessionEventStream
pub fn take_event_stream(&self) -> SessionEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn close(
&self,
) -> QueryResponseFut<CloseableCloseResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn close( &self, ) -> QueryResponseFut<CloseableCloseResult, DefaultFuchsiaResourceDialect> ⓘ
Terminates the connection.
After calling Close, the client must not send any other requests.
Servers, after sending the status response, should close the connection regardless of status and without sending an epitaph.
Closing the client end of the channel should be semantically equivalent
to calling Close without knowing when the close has completed or its
status.
Sourcepub fn get_fifo(
&self,
) -> QueryResponseFut<SessionGetFifoResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn get_fifo( &self, ) -> QueryResponseFut<SessionGetFifoResult, DefaultFuchsiaResourceDialect> ⓘ
Returns a handle to the client end of the FIFO.
Sourcepub fn attach_vmo(
&self,
vmo: Vmo,
) -> QueryResponseFut<SessionAttachVmoResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn attach_vmo( &self, vmo: Vmo, ) -> QueryResponseFut<SessionAttachVmoResult, DefaultFuchsiaResourceDialect> ⓘ
Attaches a VMO to the session. Resizable VMOs are not supported and will return
ZX_ERR_INVALID_ARGS.
Returns an identifier that can be used to refer to the VMO.
Sourcepub fn register_key(
&self,
key_token: EventPair,
) -> QueryResponseFut<SessionRegisterKeyResult, DefaultFuchsiaResourceDialect> ⓘ
pub fn register_key( &self, key_token: EventPair, ) -> QueryResponseFut<SessionRegisterKeyResult, DefaultFuchsiaResourceDialect> ⓘ
Registers an inline encryption key handle (key_token returned by
fuchsia.hardware.inlineencryption/Device.ProgramKey) with this session.
Returns a session-scoped slot token that can be passed in
BlockFifoRequest.slot when BlockIoFlag.INLINE_ENCRYPTION_ENABLED is set.
- error
ZX_ERR_ACCESS_DENIEDifkey_tokenis not a valid inline encryption key token for this block device, or if the key has been evicted. - error
ZX_ERR_NOT_SUPPORTEDif the device does not support inline encryption.
Trait Implementations§
Source§impl Clone for SessionProxy
impl Clone for SessionProxy
Source§impl Debug for SessionProxy
impl Debug for SessionProxy
Source§impl Proxy for SessionProxy
impl Proxy for SessionProxy
Source§type Protocol = SessionMarker
type Protocol = SessionMarker
Proxy controls.