Struct raft_engine::LogBatch [−][src]
Fields
items: Vec<LogItem<E>>
Implementations
impl<E, W> LogBatch<E, W> where
E: Message,
W: EntryExt<E>,
[src]
E: Message,
W: EntryExt<E>,
pub fn with_capacity(cap: usize) -> Self
[src]
pub fn add_entries(&mut self, region_id: u64, entries: Vec<E>)
[src]
pub fn clean_region(&mut self, region_id: u64)
[src]
pub fn add_command(&mut self, region_id: u64, cmd: Command)
[src]
pub fn delete(&mut self, region_id: u64, key: Vec<u8>)
[src]
pub fn put(&mut self, region_id: u64, key: Vec<u8>, value: Vec<u8>)
[src]
pub fn put_msg<M: Message>(
&mut self,
region_id: u64,
key: Vec<u8>,
m: &M
) -> Result<()>
[src]
&mut self,
region_id: u64,
key: Vec<u8>,
m: &M
) -> Result<()>
pub fn is_empty(&self) -> bool
[src]
pub fn from_bytes(
buf: &mut &'_ [u8],
file_num: u64,
base_offset: u64
) -> Result<Option<LogBatch<E, W>>>
[src]
buf: &mut &'_ [u8],
file_num: u64,
base_offset: u64
) -> Result<Option<LogBatch<E, W>>>
pub fn encode_to_bytes(
&mut self,
compression_threshold: usize
) -> Option<Vec<u8>>
[src]
&mut self,
compression_threshold: usize
) -> Option<Vec<u8>>
pub fn entries_size(&self) -> usize
[src]
Trait Implementations
impl<E: Debug, W: Debug> Debug for LogBatch<E, W> where
E: Message,
W: EntryExt<E>,
[src]
E: Message,
W: EntryExt<E>,
impl<E, W> Default for LogBatch<E, W> where
E: Message,
W: EntryExt<E>,
[src]
E: Message,
W: EntryExt<E>,
impl<E: PartialEq, W: PartialEq> PartialEq<LogBatch<E, W>> for LogBatch<E, W> where
E: Message,
W: EntryExt<E>,
[src]
E: Message,
W: EntryExt<E>,
impl<E, W> StructuralPartialEq for LogBatch<E, W> where
E: Message,
W: EntryExt<E>,
[src]
E: Message,
W: EntryExt<E>,
Auto Trait Implementations
impl<E, W> RefUnwindSafe for LogBatch<E, W> where
E: RefUnwindSafe,
W: RefUnwindSafe,
E: RefUnwindSafe,
W: RefUnwindSafe,
impl<E, W> Send for LogBatch<E, W>
impl<E, W> Sync for LogBatch<E, W>
impl<E, W> Unpin for LogBatch<E, W> where
E: Unpin,
W: Unpin,
E: Unpin,
W: Unpin,
impl<E, W> UnwindSafe for LogBatch<E, W> where
E: UnwindSafe,
W: UnwindSafe,
E: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,