pub trait PrivateEvent:
EventType
+ Clone
+ DeserializeOwned
+ Serialize
+ Debug
+ TryFrom<SerializedBytes>
+ TryInto<SerializedBytes> {
// Required methods
fn validate(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<ValidateCallbackResult>;
fn recipients(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<BTreeSet<AgentPubKey>>;
fn adds_new_recipients_for_other_events(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<bool>;
}Required Methods§
Sourcefn validate(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<ValidateCallbackResult>
fn validate( &self, event_hash: EntryHash, author: AgentPubKey, timestamp: Timestamp, ) -> ExternResult<ValidateCallbackResult>
Whether the given entry is to be accepted in to our source chain
Sourcefn recipients(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<BTreeSet<AgentPubKey>>
fn recipients( &self, event_hash: EntryHash, author: AgentPubKey, timestamp: Timestamp, ) -> ExternResult<BTreeSet<AgentPubKey>>
The agents other than the linked devices for the author that are suposed to receive this entry
Sourcefn adds_new_recipients_for_other_events(
&self,
event_hash: EntryHash,
author: AgentPubKey,
timestamp: Timestamp,
) -> ExternResult<bool>
fn adds_new_recipients_for_other_events( &self, event_hash: EntryHash, author: AgentPubKey, timestamp: Timestamp, ) -> ExternResult<bool>
Whether creating this event adds new recipients to old events When this is true, the recipients for all existing events will be recalculated, and the events with new recipients will be sent to these new recipients
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.