pub enum Event {
V0(EventV0),
}
Expand description
Pub/sub event published in a topic
Variants§
Implementations§
Source§impl Event
impl Event
pub fn new( publisher: &PrivKey, seq: u64, commit: &Commit, additional_blocks: &Vec<BlockId>, repo: &Repo, ) -> Result<Event, NgError>
pub fn seq_num(&self) -> u64
pub fn topic_id(&self) -> &TopicId
pub fn file_ids(&self) -> &Vec<ObjectId> ⓘ
pub fn publisher(&self) -> &PeerId
pub fn verify(&self) -> Result<(), NgError>
Sourcepub fn open_with_info(
&self,
repo: &Repo,
branch: &BranchInfo,
) -> Result<Commit, NgError>
pub fn open_with_info( &self, repo: &Repo, branch: &BranchInfo, ) -> Result<Commit, NgError>
opens an event with the key derived from information kept in Repo.
returns the Commit object and optional list of additional block IDs. Those blocks have been added to the storage of store of repo so they can be retrieved.
pub fn commit_id(&self) -> ObjectId
pub fn open( &self, store: &Store, repo_id: &RepoId, branch_id: &BranchId, branch_secret: &ReadCapSecret, ) -> Result<Commit, NgError>
pub fn open_with_body( &self, store: &Store, repo_id: &RepoId, branch_id: &BranchId, branch_secret: &ReadCapSecret, with_body: bool, ) -> Result<Commit, NgError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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