pub struct RedoLog { /* private fields */ }Implementations
sourceimpl RedoLog
impl RedoLog
pub async fn rotate(&mut self, header_bytes: Vec<u8>) -> Result<()>
pub fn backup(
&mut self,
include_active_files: bool
) -> Result<Pin<Box<dyn Future<Output = Result<()>> + Send + Sync>>>
pub async fn begin_flip(
&mut self,
header_bytes: Vec<u8>
) -> Result<FlippedLogFile>
pub async fn finish_flip(
&mut self,
flip: FlippedLogFile,
deferred_write_callback: impl FnMut(LogLookup, EventHeader)
) -> Result<Vec<EventHeaderRaw>, SerializationError>
pub async fn load(&self, hash: AteHash) -> Result<LoadData, LoadError>
pub fn prime(&mut self, records: Vec<(AteHash, Option<Bytes>)>)
pub fn count(&self) -> usize
pub fn size(&self) -> u64
pub fn offset(&self) -> u64
pub fn end(&self) -> LogLookup
pub async fn open(
cfg: &ConfAte,
key: &ChainKey,
flags: OpenFlags,
header_bytes: Vec<u8>
) -> Result<(RedoLog, VecDeque<LoadData>), SerializationError>
pub async fn open_ext(
cfg: &ConfAte,
key: &ChainKey,
flags: OpenFlags,
loader: Box<impl Loader>,
header_bytes: Vec<u8>
) -> Result<RedoLog, SerializationError>
pub fn destroy(&mut self) -> Result<()>
pub fn header(&self, index: u32) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl LogWritable for RedoLog
impl LogWritable for RedoLog
sourcefn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
evt: &'life1 EventWeakData
) -> Pin<Box<dyn Future<Output = Result<LogLookup, SerializationError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
evt: &'life1 EventWeakData
) -> Pin<Box<dyn Future<Output = Result<LogLookup, SerializationError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Writes data to the redo log and returns the new offset in bytes
fn flush<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for RedoLog
impl Send for RedoLog
impl Sync for RedoLog
impl Unpin for RedoLog
impl !UnwindSafe for RedoLog
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more