Enum fidl_fuchsia_io::ReadableRequest
source · pub enum ReadableRequest {
Read {
count: u64,
responder: ReadableReadResponder,
},
}
Variants§
Read
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
.
Implementations§
source§impl ReadableRequest
impl ReadableRequest
pub fn into_read(self) -> Option<(u64, ReadableReadResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL