Struct raft_proto::prelude::Snapshot[][src]

pub struct Snapshot {
    pub data: Bytes,
    pub metadata: SingularPtrField<SnapshotMetadata>,
    pub unknown_fields: UnknownFields,
    pub cached_size: CachedSize,
}

Fields

data: Bytesmetadata: SingularPtrField<SnapshotMetadata>unknown_fields: UnknownFieldscached_size: CachedSize

Implementations

impl Snapshot[src]

pub fn new() -> Snapshot[src]

pub fn get_data(&self) -> &[u8][src]

pub fn clear_data(&mut self)[src]

pub fn set_data(&mut self, v: Bytes)[src]

pub fn mut_data(&mut self) -> &mut Bytes[src]

pub fn take_data(&mut self) -> Bytes[src]

pub fn get_metadata(&self) -> &SnapshotMetadata[src]

pub fn clear_metadata(&mut self)[src]

pub fn has_metadata(&self) -> bool[src]

pub fn set_metadata(&mut self, v: SnapshotMetadata)[src]

pub fn mut_metadata(&mut self) -> &mut SnapshotMetadata[src]

pub fn take_metadata(&mut self) -> SnapshotMetadata[src]

impl Snapshot[src]

pub fn is_empty(&self) -> bool[src]

For a given snapshot, determine if it’s empty or not.

Trait Implementations

impl Clear for Snapshot[src]

impl Clone for Snapshot[src]

impl Debug for Snapshot[src]

impl Default for Snapshot[src]

impl<'a> Default for &'a Snapshot[src]

impl Message for Snapshot[src]

impl PartialEq<Snapshot> for Snapshot[src]

impl PbPrint for Snapshot[src]

impl ProtobufValue for Snapshot[src]

impl StructuralPartialEq for Snapshot[src]

Auto Trait Implementations

impl RefUnwindSafe for Snapshot

impl Send for Snapshot

impl Sync for Snapshot

impl Unpin for Snapshot

impl UnwindSafe for Snapshot

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.