pub trait AnswerLog: Send + Sync {
// Required methods
fn record<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 AnswerRecord,
) -> Pin<Box<dyn Future<Output = Result<(), SurfaceError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn find<'life0, 'life1, 'async_trait>(
&'life0 self,
approval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
// Provided methods
fn since<'life0, 'async_trait>(
&'life0 self,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
fn find_for<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
}Available on crate feature
surface only.Expand description
Where the engine keeps how each answer was given (spec 3.3 §11).
Required Methods§
Sourcefn record<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 AnswerRecord,
) -> Pin<Box<dyn Future<Output = Result<(), SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn record<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 AnswerRecord,
) -> Pin<Box<dyn Future<Output = Result<(), SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Records the answer that decided record.approval_id.
Sourcefn find<'life0, 'life1, 'async_trait>(
&'life0 self,
approval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn find<'life0, 'life1, 'async_trait>(
&'life0 self,
approval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
The answer that decided approval_id, when it was given through a surface.
Provided Methods§
Sourcefn since<'life0, 'async_trait>(
&'life0 self,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn since<'life0, 'async_trait>(
&'life0 self,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
The answers given through a surface since at, oldest first: what “How you answered”
counts (spec 3.3 §5.1). The default lists none.
Sourcefn find_for<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn find_for<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ApprovalRequest,
) -> Pin<Box<dyn Future<Output = Result<Option<AnswerRecord>, SurfaceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
The answer that decided request, when it was given through a surface: what the
engine reads for a decided card. A log may use the request’s times to read less; the
default calls find.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".