Crate entity[][src]

Modules

ext
global
prelude

Represents a collection of core traits that should be imported to enable methods on a variety of types such as Ent and EntBuilder

query
vendor

Vendor module to re-expose relevant libraries

Structs

Edge

Represents a edge from an ent to one or more other ents

EdgeDefinition

Represents a definition of an edge, which is comprised of its name, type of edge value, and the edge’s deletion policy

Field

Represents a field contained within some ent

FieldDefinition

Represents a definition of a field, which is comprised of its name, type of value, and any associated attributes

IdAllocator

Represents the allocator of unique ids

KeyValueDatabaseExecutor
MapTypedPredicate

Represents a typed Predicate specifically for maps such as std::collections::HashMap, ensuring that only valid conditions are used for a given type.

Query

Represents a generic query to find ents within some database

TypedPredicate

Represents a typed Predicate, ensuring that only valid conditions are used for a given type

UntypedEnt

Represents a general-purpose ent that is shapeless (no hard type) and maintains fields and edges using internal maps. This ent can optionally be connected to a database and supports additional functionality like loading ents from edges when connected.

Enums

DatabaseError

Represents some error the can occur when accessing the database

EdgeDeletionPolicy

Represents the policy to apply to an edge when its ent is deleted

EdgeValue

Represents the value of an edge, which is some collection of ent ids

EdgeValueMutationError

Represents some error the can occur when mutating an edge’s value

EdgeValueType

Auto-generated discriminant enum variants

EntConversionError

Represents some error that can occur when converting an ent to another type

EntMutationError

Represents some error the can occur when mutating an ent

FieldAttribute

Represents an attribute associated with a field for an ent

Filter

Represents some filter to apply against an ent when searching through a database

Number

Represents a generic number that maintains an internal Rust representation of the actual number

NumberSign

Represents the sign of a number

NumberType

Auto-generated discriminant enum variants

Predicate

Represents an untyped predicate that can be used to inspect a value for some specified condition

Primitive

Represents a primitive value

PrimitiveType

Represents primitive value types

Value

Represents either a primitive or complex value

ValueType

Represents value types (primitive or complex). Assumes that complex types will contain the same inner type and does not vary

Constants

EPHEMERAL_ID

Represents the id that is not used for allocation but is instead reserved by applications for grabbing a different, unique id

Traits

AsAny

Trait used for casting support into the Any trait object

Database

Represents a synchronous database, which performs blocking CRUD operations using ents. Given that many database implementations handle interior mutability themselves, the API of this trait does not provide any mut guarantees itself.

DatabaseExt
Ent

Represents the interface for a generic entity whose fields and edges can be accessed by str name regardless of compile-time characteristics

EntBuilder

Represents a builder interface for some ent, capable of building a new ent instance and also saving the new ent to the database at the same time

EntExt
EntLoader

Represents an interface to load some ent from a database

EntQuery

Represents a query interface for some ent

EntType

Represents the interface for an Ent to report its type. This should align with [Ent::r#type()] method and is used when we must know the type without having an instance of an ent.

EntWrapper

Represents a wrapper around some set of ents that implement Ent, useful for edges that can return one of many different types that are variants of an enum

KeyValueDatabase

Represents a key-value store database that performs synchronous insertion, retrieval, and removal. It provides blanket support for Database(super::Database] to perform complex operations.

NumberLike

Represents some data that can be converted to and from a Number

PrimitiveLike

Represents some data that can be converted to and from a Primitive

ValueLike

Represents some data that can be converted to and from a Value

Type Definitions

DatabaseRc

Represents a thread-safe reference to a boxed database trait object

DatabaseResult

Alias to a result that can contain a database error

Id

Represents the type for ids

WeakDatabaseRc

Represents a weak thread-safe reference to a boxed database trait object