pub trait NodeEntity: FieldSet + TryFrom<Node> {
type Id: NodeId<T = Self>;
// Required method
fn identifier(&self) -> Self::Id;
// Provided methods
fn into_identifier(self) -> Self::Id { ... }
fn create(&self) -> Query { ... }
fn update(&self) -> Query { ... }
}Expand description
A node [Entity].
Required Associated Types§
Required Methods§
Sourcefn identifier(&self) -> Self::Id
fn identifier(&self) -> Self::Id
Get the NodeId for this entity.
This is less efficient than using self.into(), but is useful when you don’t want to consume the entity.
The implementation in derive will clone the individual ID fields as necessary.
Provided Methods§
Sourcefn into_identifier(self) -> Self::Id
fn into_identifier(self) -> Self::Id
Convenience method for self.into().
fn create(&self) -> Query
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.