Struct google_api_proto::google::bytestream::WriteRequest
source · pub struct WriteRequest {
pub resource_name: String,
pub write_offset: i64,
pub finish_write: bool,
pub data: Bytes,
}
Expand description
Request object for ByteStream.Write.
Fields§
§resource_name: String
The name of the resource to write. This must be set on the first
WriteRequest
of each Write()
action. If it is set on subsequent calls,
it must match the value of the first request.
write_offset: i64
The offset from the beginning of the resource at which the data should be
written. It is required on all WriteRequest
s.
In the first WriteRequest
of a Write()
action, it indicates
the initial offset for the Write()
call. The value must be equal to
the committed_size
that a call to QueryWriteStatus()
would return.
On subsequent calls, this value must be set and must be equal to
the sum of the first write_offset
and the sizes of all data
bundles
sent previously on this stream.
An incorrect value will cause an error.
finish_write: bool
If true
, this indicates that the write is complete. Sending any
WriteRequest
s subsequent to one in which finish_write
is true
will
cause an error.
data: Bytes
A portion of the data for the resource. The client may leave data
empty for any given WriteRequest
. This enables the client to inform the
service that the request is still live while it is running an operation to
generate more data.
Trait Implementations§
source§impl Clone for WriteRequest
impl Clone for WriteRequest
source§fn clone(&self) -> WriteRequest
fn clone(&self) -> WriteRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WriteRequest
impl Debug for WriteRequest
source§impl Default for WriteRequest
impl Default for WriteRequest
source§impl Message for WriteRequest
impl Message for WriteRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
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,
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,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self
.source§impl PartialEq for WriteRequest
impl PartialEq for WriteRequest
source§fn eq(&self, other: &WriteRequest) -> bool
fn eq(&self, other: &WriteRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for WriteRequest
Auto Trait Implementations§
impl !Freeze for WriteRequest
impl RefUnwindSafe for WriteRequest
impl Send for WriteRequest
impl Sync for WriteRequest
impl Unpin for WriteRequest
impl UnwindSafe for WriteRequest
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
§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>
T
in a tonic::Request