pub struct Ledger<'a, S: Db> { /* private fields */ }Expand description
Ledger controller of the database
Implementations§
Source§impl<'a, S: Db> Ledger<'a, S>
impl<'a, S: Db> Ledger<'a, S>
pub fn new(db: &'a S) -> Self
Sourcepub fn open(&self, p1: BorderlessId, p2: BorderlessId) -> SelectedLedger<'a, S>
pub fn open(&self, p1: BorderlessId, p2: BorderlessId) -> SelectedLedger<'a, S>
Opens a ledger for a pair of borderless-ids
Sourcepub fn select(&self, ledger_id: u64) -> SelectedLedger<'a, S>
pub fn select(&self, ledger_id: u64) -> SelectedLedger<'a, S>
Selects a specific ledger based on its ID
Sourcepub fn all(&self) -> Result<Vec<LedgerMeta>>
pub fn all(&self) -> Result<Vec<LedgerMeta>>
Returns a list of all existing ledgers
Sourcepub fn all_paginated(
&self,
pagination: Pagination,
) -> Result<PaginatedElements<LedgerMetaDto>>
pub fn all_paginated( &self, pagination: Pagination, ) -> Result<PaginatedElements<LedgerMetaDto>>
Returns a list of all existing ledgers
pub fn all_ids(&self) -> Result<Vec<LedgerIds>>
pub fn all_ids_paginated( &self, pagination: Pagination, ) -> Result<PaginatedElements<LedgerIds>>
Auto Trait Implementations§
impl<'a, S> Freeze for Ledger<'a, S>
impl<'a, S> RefUnwindSafe for Ledger<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Ledger<'a, S>
impl<'a, S> Sync for Ledger<'a, S>
impl<'a, S> Unpin for Ledger<'a, S>
impl<'a, S> UnsafeUnpin for Ledger<'a, S>
impl<'a, S> UnwindSafe for Ledger<'a, S>where
S: RefUnwindSafe,
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> 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