pub struct Log(/* private fields */);Expand description
A log file used to store SQLite WAL frames
Implementations§
Source§impl Log
impl Log
Sourcepub async fn create(start_frame_no: FrameNo) -> Result<Self>
pub async fn create(start_frame_no: FrameNo) -> Result<Self>
Create a new log file starting at the given frame number
Sourcepub fn start_frame_no(&self) -> FrameNo
pub fn start_frame_no(&self) -> FrameNo
Return the frame number of the first frame in the log
Sourcepub fn next_frame_no(&self) -> FrameNo
pub fn next_frame_no(&self) -> FrameNo
Return the frame number of the next frame to be written
Sourcepub fn last_frame_no(&self) -> Option<FrameNo>
pub fn last_frame_no(&self) -> Option<FrameNo>
Return the frame number of the last frame in the log
Sourcepub async fn read_frame(&self, frame_no: FrameNo) -> Result<Frame>
pub async fn read_frame(&self, frame_no: FrameNo) -> Result<Frame>
Read a frame from the log
Sourcepub async fn push_frames(&mut self, frames: Vec<Frame>) -> Result<()>
pub async fn push_frames(&mut self, frames: Vec<Frame>) -> Result<()>
Push new frames to the log
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Log
impl !RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl !UnwindSafe for Log
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request