pub struct InstallSnapshotResponse {
pub term: Term,
pub success: bool,
pub next_offset: Option<u64>,
}Expand description
InstallSnapshot RPC response
Fields§
§term: TermCurrent term, for leader to update itself
success: boolTrue if snapshot was successfully installed
next_offset: Option<u64>The byte offset for the next chunk (for resume)
Implementations§
Source§impl InstallSnapshotResponse
impl InstallSnapshotResponse
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError>
Deserialize from bytes
Trait Implementations§
Source§impl Clone for InstallSnapshotResponse
impl Clone for InstallSnapshotResponse
Source§fn clone(&self) -> InstallSnapshotResponse
fn clone(&self) -> InstallSnapshotResponse
Returns a duplicate 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 InstallSnapshotResponse
impl Debug for InstallSnapshotResponse
Source§impl<'de> Deserialize<'de> for InstallSnapshotResponse
impl<'de> Deserialize<'de> for InstallSnapshotResponse
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InstallSnapshotResponse
impl RefUnwindSafe for InstallSnapshotResponse
impl Send for InstallSnapshotResponse
impl Sync for InstallSnapshotResponse
impl Unpin for InstallSnapshotResponse
impl UnwindSafe for InstallSnapshotResponse
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