pub struct OpenraftLogCodec;Expand description
The LogStoreCodec provider this driver wires into RocksdbLogStore.
Zero-sized type-level marker. Behavior-preserving: every body is the same whole-value postcard the store wrote before the seam existed.
Trait Implementations§
Source§impl Clone for OpenraftLogCodec
impl Clone for OpenraftLogCodec
Source§fn clone(&self) -> OpenraftLogCodec
fn clone(&self) -> OpenraftLogCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OpenraftLogCodec
Source§impl Debug for OpenraftLogCodec
impl Debug for OpenraftLogCodec
Source§impl Default for OpenraftLogCodec
impl Default for OpenraftLogCodec
Source§fn default() -> OpenraftLogCodec
fn default() -> OpenraftLogCodec
Returns the “default value” for a type. Read more
Source§impl LogStoreCodec<TypeConfig> for OpenraftLogCodec
impl LogStoreCodec<TypeConfig> for OpenraftLogCodec
Source§fn encode_entry(
version: u8,
entry: &<TypeConfig as RaftTypeConfig>::Entry,
) -> Result<Vec<u8>, CodecError>
fn encode_entry( version: u8, entry: &<TypeConfig as RaftTypeConfig>::Entry, ) -> Result<Vec<u8>, CodecError>
Encode a log
Entry body at version.Source§fn decode_entry(
_version: u8,
body: &[u8],
) -> Result<<TypeConfig as RaftTypeConfig>::Entry, CodecError>
fn decode_entry( _version: u8, body: &[u8], ) -> Result<<TypeConfig as RaftTypeConfig>::Entry, CodecError>
Decode a log
Entry body known to be version.Source§fn encode_vote(_version: u8, vote: &OpenraftVote) -> Result<Vec<u8>, CodecError>
fn encode_vote(_version: u8, vote: &OpenraftVote) -> Result<Vec<u8>, CodecError>
Encode a
Vote body at version.Source§fn decode_vote(_version: u8, body: &[u8]) -> Result<OpenraftVote, CodecError>
fn decode_vote(_version: u8, body: &[u8]) -> Result<OpenraftVote, CodecError>
Decode a
Vote body known to be version.Source§fn encode_log_id(
_version: u8,
log_id: &OpenraftLogId,
) -> Result<Vec<u8>, CodecError>
fn encode_log_id( _version: u8, log_id: &OpenraftLogId, ) -> Result<Vec<u8>, CodecError>
Encode a
LogId body at version.Source§fn decode_log_id(_version: u8, body: &[u8]) -> Result<OpenraftLogId, CodecError>
fn decode_log_id(_version: u8, body: &[u8]) -> Result<OpenraftLogId, CodecError>
Decode a
LogId body known to be version.Auto Trait Implementations§
impl Freeze for OpenraftLogCodec
impl RefUnwindSafe for OpenraftLogCodec
impl Send for OpenraftLogCodec
impl Sync for OpenraftLogCodec
impl Unpin for OpenraftLogCodec
impl UnsafeUnpin for OpenraftLogCodec
impl UnwindSafe for OpenraftLogCodec
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more