pub trait InsertInput: Sized {
type Entity: Entity;
// Provided method
fn into_entity(self) -> Result<Self::Entity, Error> { ... }
}Expand description
Typed insert construction with omission distinct from explicit optional absence.
Generated inputs implement this once per entity; execution stays in Batch.
Managed fields have no input setters:
ⓘ
use ic_db::entity;
#[entity(pk(field="id"), fields(
field(name="id",value(item(prim="Nat64"))),
field(name="created",value(item(prim="Timestamp")),managed="created_at")
))]
struct Entry {}
let input = Entry::insert().id(1).created(ic_db::Timestamp::from_millis(0));Required Associated Types§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".