Struct google_api_proto::google::bytestream::ReadRequest
source · pub struct ReadRequest {
pub resource_name: String,
pub read_offset: i64,
pub read_limit: i64,
}
Expand description
Request object for ByteStream.Read.
Fields§
§resource_name: String
The name of the resource to read.
read_offset: i64
The offset for the first byte to return in the read, relative to the start of the resource.
A read_offset
that is negative or greater than the size of the resource
will cause an OUT_OF_RANGE
error.
read_limit: i64
The maximum number of data
bytes the server is allowed to return in the
sum of all ReadResponse
messages. A read_limit
of zero indicates that
there is no limit, and a negative read_limit
will cause an error.
If the stream returns fewer bytes than allowed by the read_limit
and no
error occurred, the stream includes all data from the read_offset
to the
end of the resource.
Trait Implementations§
source§impl Clone for ReadRequest
impl Clone for ReadRequest
source§fn clone(&self) -> ReadRequest
fn clone(&self) -> ReadRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ReadRequest
impl Debug for ReadRequest
source§impl Default for ReadRequest
impl Default for ReadRequest
source§impl Message for ReadRequest
impl Message for ReadRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for ReadRequest
impl PartialEq for ReadRequest
source§fn eq(&self, other: &ReadRequest) -> bool
fn eq(&self, other: &ReadRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ReadRequest
Auto Trait Implementations§
impl Freeze for ReadRequest
impl RefUnwindSafe for ReadRequest
impl Send for ReadRequest
impl Sync for ReadRequest
impl Unpin for ReadRequest
impl UnwindSafe for ReadRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request