pub enum SessionRequest {
Close {
responder: SessionCloseResponder,
},
GetFifo {
responder: SessionGetFifoResponder,
},
AttachVmo {
vmo: Vmo,
responder: SessionAttachVmoResponder,
},
}
Expand description
Represents a session with a block device.
This protocol encodes the underlying object’s lifetime in both directions; the underlying object is alive iff both ends of the protocol are open. That is:
- Closing the client end causes the object to be destroyed.
- Observing a closure of the server end indicates the object no longer exists.
The object can be destroyed synchronously using [fuchsia.unknown/Closeable.Close
].
Variants§
Close
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.
Fields
responder: SessionCloseResponder
GetFifo
Returns a handle to the client end of the FIFO.
Fields
responder: SessionGetFifoResponder
AttachVmo
Attaches a VMO to the session.
Returns an identifer that can be used to refer to the VMO.
Implementations§
Source§impl SessionRequest
impl SessionRequest
pub fn into_close(self) -> Option<SessionCloseResponder>
pub fn into_get_fifo(self) -> Option<SessionGetFifoResponder>
pub fn into_attach_vmo(self) -> Option<(Vmo, SessionAttachVmoResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL