pub type ReadableProxy = ClientSender<Channel, Readable>;
Expand description
An alias for a client sender over zx::Channel
for the Readable
protocol.
Aliased Type§
struct ReadableProxy { /* private fields */ }
Implementations
§impl<T, P> ClientSender<T, P>where
T: Transport,
impl<T, P> ClientSender<T, P>where
T: Transport,
pub fn wrap_untyped(client: &ClientSender<T>) -> &ClientSender<T, P>
pub fn wrap_untyped(client: &ClientSender<T>) -> &ClientSender<T, P>
Wraps an untyped sender reference, returning a typed sender reference.
pub fn as_untyped(&self) -> &ClientSender<T>
pub fn as_untyped(&self) -> &ClientSender<T>
Returns the underlying untyped sender.
pub fn close(&self)
pub fn close(&self)
Closes the channel from the client end.
Trait Implementations
Source§impl<___T> ReadableClientSender for ClientSender<___T, Readable>where
___T: Transport,
impl<___T> ReadableClientSender for ClientSender<___T, Readable>where
___T: Transport,
Source§fn read<___R>(
&self,
request: ___R,
) -> Result<ResponseFuture<'_, Self::Transport, Read>, EncodeError>where
___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireReadableReadRequest>,
fn read<___R>(
&self,
request: ___R,
) -> Result<ResponseFuture<'_, Self::Transport, Read>, EncodeError>where
___R: Encode<<Self::Transport as Transport>::SendBuffer, Encoded = WireReadableReadRequest>,
Reads up to ‘count’ bytes at the seek offset. The seek offset is moved forward by the number of bytes read.
§Invariants
- The returned
data.length
will never be greater thancount
. - If
data.length
is less thancount
, it means that the seek offset has reached the end of file as part of this operation. - If
data.length
is zero whilecount
is not, it means that the seek offset is already at or beyond the end of file, and no data could be read. - If
count
is zero, the server should perform all the checks ensuring read access without actually read anything, and return an emptydata
vector.
This method requires the [Rights.READ_BYTES
] right.
Returns ZX_ERR_OUT_OF_RANGE
if count
is greater than MAX_TRANSFER_SIZE
.