Struct cala_server::CalaLedger
source · pub struct CalaLedger { /* private fields */ }Implementations§
source§impl CalaLedger
impl CalaLedger
pub async fn init(config: CalaLedgerConfig) -> Result<CalaLedger, LedgerError>
pub fn pool(&self) -> &Pool<Postgres>
pub async fn begin_operation<'a>( &self, ) -> Result<AtomicOperation<'a>, LedgerError>
pub fn accounts(&self) -> &Accounts
pub fn velocities(&self) -> &Velocities
pub fn account_sets(&self) -> &AccountSets
pub fn journals(&self) -> &Journals
pub fn tx_templates(&self) -> &TxTemplates
pub fn balances(&self) -> &Balances
pub fn transactions(&self) -> &Transactions
pub async fn post_transaction( &self, tx_id: TransactionId, tx_template_code: &str, params: impl Into<Params> + Debug, ) -> Result<Transaction, LedgerError>
pub async fn post_transaction_in_op( &self, op: &mut AtomicOperation<'_>, tx_id: TransactionId, tx_template_code: &str, params: impl Into<Params> + Debug, ) -> Result<Transaction, LedgerError>
pub async fn register_outbox_listener( &self, start_after: Option<EventSequence>, ) -> Result<OutboxListener, LedgerError>
pub async fn sync_outbox_event( &self, db: Transaction<'_, Postgres>, origin: DataSourceId, event: OutboxEvent, ) -> Result<(), LedgerError>
pub async fn await_outbox_handle(&self) -> Result<(), LedgerError>
pub fn shutdown_outbox(&mut self) -> Result<(), LedgerError>
Trait Implementations§
source§impl Clone for CalaLedger
impl Clone for CalaLedger
source§fn clone(&self) -> CalaLedger
fn clone(&self) -> CalaLedger
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CalaLedger
impl !RefUnwindSafe for CalaLedger
impl Send for CalaLedger
impl Sync for CalaLedger
impl Unpin for CalaLedger
impl !UnwindSafe for CalaLedger
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§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> 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 moresource§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::Requestsource§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