pub struct StartPartitionSessionResponse {
pub partition_session_id: i64,
pub read_offset: Option<i64>,
pub commit_offset: Option<i64>,
}
Expand description
Signal for server that cient is ready to recive data for partition.
Fields§
§partition_session_id: i64
Partition session identifier of partition to start read.
read_offset: Option<i64>
Reads in this partition session will start from offset no less than read_offset. If read_offset is set, server will check that read_offset is no less that actual committed offset. If check fails then server will send an error message (status != SUCCESS) and close stream. If read_offset is not set, no check will be made. InitRequest.max_lag and InitRequest.read_from could lead to skip of more messages. Server will return data starting from offset that is maximum of actual committed offset, read_offset (if set) and offsets calculated from InitRequest.max_lag and InitRequest.read_from.
commit_offset: Option<i64>
All messages with offset less than commit_offset are processed by client. Server will commit this position if this is not done yet.
Implementations§
Source§impl StartPartitionSessionResponse
impl StartPartitionSessionResponse
Sourcepub fn read_offset(&self) -> i64
pub fn read_offset(&self) -> i64
Returns the value of read_offset
, or the default value if read_offset
is unset.
Sourcepub fn commit_offset(&self) -> i64
pub fn commit_offset(&self) -> i64
Returns the value of commit_offset
, or the default value if commit_offset
is unset.
Trait Implementations§
Source§impl Clone for StartPartitionSessionResponse
impl Clone for StartPartitionSessionResponse
Source§fn clone(&self) -> StartPartitionSessionResponse
fn clone(&self) -> StartPartitionSessionResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for StartPartitionSessionResponse
impl<'de> Deserialize<'de> for StartPartitionSessionResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for StartPartitionSessionResponse
impl Message for StartPartitionSessionResponse
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for StartPartitionSessionResponse
impl PartialEq for StartPartitionSessionResponse
Source§fn eq(&self, other: &StartPartitionSessionResponse) -> bool
fn eq(&self, other: &StartPartitionSessionResponse) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for StartPartitionSessionResponse
Auto Trait Implementations§
impl Freeze for StartPartitionSessionResponse
impl RefUnwindSafe for StartPartitionSessionResponse
impl Send for StartPartitionSessionResponse
impl Sync for StartPartitionSessionResponse
impl Unpin for StartPartitionSessionResponse
impl UnwindSafe for StartPartitionSessionResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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