pub enum Event {
RefsFetched {
remote: PublicKey,
rid: RepoId,
updated: Vec<RefUpdate>,
},
RefsSynced {
remote: PublicKey,
rid: RepoId,
at: Oid,
},
SeedDiscovered {
rid: RepoId,
nid: PublicKey,
},
SeedDropped {
rid: RepoId,
nid: PublicKey,
},
PeerConnected {
nid: PublicKey,
},
PeerDisconnected {
nid: PublicKey,
reason: String,
},
LocalRefsAnnounced {
rid: RepoId,
refs: RefsAt,
timestamp: Timestamp,
},
InventoryAnnounced {
nid: PublicKey,
inventory: Vec<RepoId>,
timestamp: Timestamp,
},
RefsAnnounced {
nid: PublicKey,
rid: RepoId,
refs: Vec<RefsAt>,
timestamp: Timestamp,
},
NodeAnnounced {
nid: PublicKey,
alias: Alias,
timestamp: Timestamp,
features: Features,
addresses: Vec<Address>,
},
UploadPack(UploadPack),
}
Expand description
A service event.
The node emits events of this type to its control socket for other programs to consume.
Variants§
RefsFetched
The node has received changes to Git references in a repository stored on the node, from another node.
Fields
RefsSynced
The node has sent its list of Git references to another node and the other has fetched the updated references.
Fields
SeedDiscovered
The node has discovered a repository on new node on the Radicle network.
Fields
SeedDropped
The node has dropped a repository on a node from its list of known repositories and nodes.
Fields
PeerConnected
The node has connected directly to another node.
PeerDisconnected
The node has terminated its direct connection to another node.
Fields
LocalRefsAnnounced
The local node has received changes to Git references from its local user. In other words, the local user has pushed to the node, updated COBs, or otherwise updated refs in their local node.
Fields
InventoryAnnounced
The node has received a message with a list of repositories on another node on the network.
Fields
RefsAnnounced
The node has received a message about new signed Git references (“sigrefs”) for a repository on another node on the network.
Fields
NodeAnnounced
The node received a message about a new node on the network.
Fields
UploadPack(UploadPack)
The node has uploaded a Git pack file to another node.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<UploadPack> for Event
impl From<UploadPack> for Event
Source§fn from(value: UploadPack) -> Event
fn from(value: UploadPack) -> Event
Source§impl Serialize for Event
impl Serialize for Event
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more