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: i64Partition 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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
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<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
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 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
§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