Trait CedarEntity

Source
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§

Source

const TYPE_NAME: EntityTypeName

The full qualified cedar name of this entity type.

Required Associated Types§

Source

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.

Source

type Id: CedarId

The id type for this entity.

Source

type Attrs: Serialize

The attributes for this entity. Normally this is Self.

Required Methods§

Source

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.

Implementors§