Skip to main content

Create

Trait Create 

Source
pub trait Create<T, C: UserId> {
    // Required method
    fn create(self, ctx: &C) -> EntityResult<T>;
}
Expand description

Trait for entity creation logic.

Implement this trait on your entity types to define creation logic that validates and creates entities based on user context.

Required Methods§

Source

fn create(self, ctx: &C) -> EntityResult<T>

Creates an entity with the given context.

Implementors§