pub struct ApplyKeepsake {
pub id: KeepsakeId,
pub subject: SubjectRef,
pub relation_id: RelationId,
pub at: DateTime<Utc>,
pub metadata: BTreeMap<String, String>,
pub context: CommandContext,
}Expand description
Applies a relation to a subject.
Fields§
§id: KeepsakeIdCaller-supplied keepsake id.
subject: SubjectRefSubject to receive the relation.
relation_id: RelationIdRelation definition id.
at: DateTime<Utc>Command timestamp.
metadata: BTreeMap<String, String>Opaque application metadata.
context: CommandContextAudit context.
Implementations§
Source§impl ApplyKeepsake
impl ApplyKeepsake
Sourcepub fn new(
subject: SubjectRef,
relation_id: RelationId,
at: DateTime<Utc>,
context: CommandContext,
) -> Self
pub fn new( subject: SubjectRef, relation_id: RelationId, at: DateTime<Utc>, context: CommandContext, ) -> Self
Creates an apply command with a generated id.
Sourcepub fn for_spec<Spec>(
subject: SubjectRef,
at: DateTime<Utc>,
context: CommandContext,
) -> Selfwhere
Spec: RelationSpec,
pub fn for_spec<Spec>(
subject: SubjectRef,
at: DateTime<Utc>,
context: CommandContext,
) -> Selfwhere
Spec: RelationSpec,
Creates an apply command for a typed relation spec.
Trait Implementations§
Source§impl Clone for ApplyKeepsake
impl Clone for ApplyKeepsake
Source§fn clone(&self) -> ApplyKeepsake
fn clone(&self) -> ApplyKeepsake
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApplyKeepsake
impl Debug for ApplyKeepsake
Source§impl<'de> Deserialize<'de> for ApplyKeepsake
impl<'de> Deserialize<'de> for ApplyKeepsake
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ApplyKeepsake
Source§impl PartialEq for ApplyKeepsake
impl PartialEq for ApplyKeepsake
Source§fn eq(&self, other: &ApplyKeepsake) -> bool
fn eq(&self, other: &ApplyKeepsake) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ApplyKeepsake
impl Serialize for ApplyKeepsake
impl StructuralPartialEq for ApplyKeepsake
Auto Trait Implementations§
impl Freeze for ApplyKeepsake
impl RefUnwindSafe for ApplyKeepsake
impl Send for ApplyKeepsake
impl Sync for ApplyKeepsake
impl Unpin for ApplyKeepsake
impl UnsafeUnpin for ApplyKeepsake
impl UnwindSafe for ApplyKeepsake
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more