Skip to main content

write_create

Function write_create 

Source
pub async fn write_create<R: Resource>(
    cx: &Cx,
    form: R::Form,
    ex: &mut dyn Executor,
) -> Result<R::Model>
Expand description

The derived create: the form’s builder, the request tenant stamped on the resource’s Tenancy::column, executed through ex.

A resource whose tenant is inherited (Tenancy::via) has nothing to stamp.

§Errors

A tenantless request on a tenant-scoped resource (the handler answers 403 first), a column tenancy whose lens names no field of the model (the mount refuses it first), a resource the request’s panel does not mount, or the driver’s error.