Crate spicedb_rust

Source

Modules§

spicedb

Structs§

NoCaveat
NoRelations
Use this time for Relations when implementing Entity for something that will never have a any relation to.
SpiceDBClient
WildCardId
Use this type to build your wildcard entity types. Often there already are wildcard shortcuts like add_wildcard_relationship in the write_relationships_request builder that can be used instead of this. However for more niche usecases where you need to pass in a WildCard user for an entity in an operation that currently doesn’t have a shortcut, this can be implemented and used.

Enums§

RelationshipOperation

Traits§

Actor
Implement the Actor trait for any struct that will represent someone/something taking action in your system. it could for example be an enum wrapping User/Organization/Service if those are entities that can take action.
Caveat
Entity
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.
Permission
Represents possible permissions on a Resource Easiest way to implement is implementing Into<&'static str> for your enum, which can builder achieved with strum::IntoStaticStr
Relation
Represents possible relations to an Entity Easiest way to implement is implementing Into<&'static str> for your enum, which can builder achieved with strum::IntoStaticStr
Resource
A resource is any Entity that also has Permissions associated

Type Aliases§

Error

Derive Macros§

IntoStaticStr
Implements From<MyEnum> for &'static str on an enum.