actix_cloud_codegen

Attribute Macro partial_entity

source
#[partial_entity]
Available on crate feature seaorm only.
Expand description

Implement into for entity to partial entity. The fields should be exactly the same.

§Examples

#[partial_entity(users::Model)]
#[derive(Serialize)]
struct Rsp {
    pub id: i64,
}

let y = users::Model {
    id: ...,
    name: ...,
    ...
};
let x: Rsp = y.into();