Struct cloud_util::wal::Wal
source · pub struct Wal { /* private fields */ }Implementations§
source§impl Wal
impl Wal
pub async fn create(dir: &str) -> Result<Wal>
pub async fn set_height(&mut self, height: u64) -> Result<u64>
pub async fn save( &mut self, height: u64, log_type: LogType, msg: &[u8] ) -> Result<u64>
pub fn get_cur_height(&self) -> u64
pub async fn load(&mut self) -> Vec<(u8, Vec<u8>)>
pub async fn clear_file(&mut self) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Wal
impl Send for Wal
impl Sync for Wal
impl Unpin for Wal
impl !UnwindSafe for Wal
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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