pub trait CedarEntity {
type TagType: Serialize;
type Id: CedarId;
type Attrs: Serialize;
const TYPE_NAME: EntityTypeName;
// Required method
fn entity_type_name() -> &'static EntityTypeName;
}
Expand description
A trait defining an entity.
Required Associated Constants§
Sourceconst TYPE_NAME: EntityTypeName
const TYPE_NAME: EntityTypeName
The full qualified cedar name of this entity type.
Required Associated Types§
Sourcetype TagType: Serialize
type TagType: Serialize
Entities can have tags attached to them. Not all entities have tags and if your entity does not have tag you should use the crate::NoTag type.
Required Methods§
Sourcefn entity_type_name() -> &'static EntityTypeName
fn entity_type_name() -> &'static EntityTypeName
The parsed type name for this entity.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.