Skip to main content

AuditedSaveExt

Trait AuditedSaveExt 

Source
pub trait AuditedSaveExt {
    // Required method
    fn save<'a>(
        self,
        ctx: &'a UserContext,
    ) -> Pin<Box<dyn Future<Output = Result<GraphNode, RuntimeError>> + Send + 'a>>;
}
Expand description

Extension trait that provides the .save(&ctx) method on Audited<T>.

§Example

use teaql_runtime::AuditedSaveExt;

school.audit_as("创建学校").save(&ctx).await?;

Required Methods§

Source

fn save<'a>( self, ctx: &'a UserContext, ) -> Pin<Box<dyn Future<Output = Result<GraphNode, RuntimeError>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> AuditedSaveExt for Audited<T>
where T: Entity + Send + 'static,

Source§

fn save<'a>( self, ctx: &'a UserContext, ) -> Pin<Box<dyn Future<Output = Result<GraphNode, RuntimeError>> + Send + 'a>>

Implementors§