Trait spicedb_rust::Entity
source · pub trait Entity: 'static {
type Relations: Relation;
type Id: FromStr + Into<String>;
// Required method
fn object_type() -> &'static str;
}Expand description
An entity is any object in your SpiceDB system
The Id type represents whatever rust type you’re using internally, since SpiceDB only uses
Strings to avoid having to convert and deal with errors everywhere we use trait bounds FromStr and Into<String>
which a lot of common Id types like Uuid or u32 already implement.
Required Associated Types§
Required Methods§
fn object_type() -> &'static str
Object Safety§
This trait is not object safe.