pub struct PostgresCheckpointSink { /* private fields */ }Expand description
Postgres append-only checkpoint sink. Anchors signed checkpoints to a
separate database so a host attacker cannot silently rewrite or truncate
the local chain without being detected on the next verify.
Implementations§
Source§impl PostgresCheckpointSink
impl PostgresCheckpointSink
Sourcepub async fn connect(url: &str) -> Result<Self, CheckpointSinkError>
pub async fn connect(url: &str) -> Result<Self, CheckpointSinkError>
Connect to url, create the append-only audit_checkpoints table if it
does not exist, and return the sink.
Trait Implementations§
Source§impl CheckpointSink for PostgresCheckpointSink
impl CheckpointSink for PostgresCheckpointSink
Source§fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointSinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 Checkpoint,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointSinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append one signed checkpoint. Must not overwrite prior checkpoints.
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresCheckpointSink
impl !UnwindSafe for PostgresCheckpointSink
impl Freeze for PostgresCheckpointSink
impl Send for PostgresCheckpointSink
impl Sync for PostgresCheckpointSink
impl Unpin for PostgresCheckpointSink
impl UnsafeUnpin for PostgresCheckpointSink
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