pub struct ChunkToPatch {
pub target_buffer: Option<u32>,
pub writer_id: Option<u32>,
pub chunk_id: Option<u32>,
pub patches: Vec<Patch>,
pub has_more_patches: Option<bool>,
}
Expand description
Used to patch chunks that have already been sent to the service. The chunk might not be in the shared memory buffer anymore as it could have been moved by the service in response to a prior CommitDataRequest. It is perfectly valid to patch a chunk that is being notified in the same message (a chunk can show up both in the |changed_pages| and |patches| field within the same CommitDataRequest message). In other words, |chunks_to_patch| is always processed after |chunks_to_move|.
Fields§
§target_buffer: Option<u32>
§writer_id: Option<u32>
{WriterID, ChunkID} uniquely identify a chunk for the current producer.
chunk_id: Option<u32>
§patches: Vec<Patch>
List of patches to apply to the given chunk.
has_more_patches: Option<bool>
When true more patches will follow in future requests and the chunk should be still considered as patch-pending. When false the chunk becomes eligible for reading.
Implementations§
Source§impl ChunkToPatch
impl ChunkToPatch
Sourcepub fn target_buffer(&self) -> u32
pub fn target_buffer(&self) -> u32
Returns the value of target_buffer
, or the default value if target_buffer
is unset.
Sourcepub fn writer_id(&self) -> u32
pub fn writer_id(&self) -> u32
Returns the value of writer_id
, or the default value if writer_id
is unset.
Sourcepub fn chunk_id(&self) -> u32
pub fn chunk_id(&self) -> u32
Returns the value of chunk_id
, or the default value if chunk_id
is unset.
Sourcepub fn has_more_patches(&self) -> bool
pub fn has_more_patches(&self) -> bool
Returns the value of has_more_patches
, or the default value if has_more_patches
is unset.
Trait Implementations§
Source§impl Clone for ChunkToPatch
impl Clone for ChunkToPatch
Source§fn clone(&self) -> ChunkToPatch
fn clone(&self) -> ChunkToPatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ChunkToPatch
impl Debug for ChunkToPatch
Source§impl Default for ChunkToPatch
impl Default for ChunkToPatch
Source§impl Message for ChunkToPatch
impl Message for ChunkToPatch
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
.