pub enum Event {
    DiscoverServed {
        enquirer: PeerId,
        registrations: Vec<Registration>,
    },
    DiscoverNotServed {
        enquirer: PeerId,
        error: ErrorCode,
    },
    PeerRegistered {
        peer: PeerId,
        registration: Registration,
    },
    PeerNotRegistered {
        peer: PeerId,
        namespace: Namespace,
        error: ErrorCode,
    },
    PeerUnregistered {
        peer: PeerId,
        namespace: Namespace,
    },
    RegistrationExpired(Registration),
}

Variants§

§

DiscoverServed

Fields

§enquirer: PeerId
§registrations: Vec<Registration>

We successfully served a discover request from a peer.

§

DiscoverNotServed

Fields

§enquirer: PeerId
§error: ErrorCode

We failed to serve a discover request for a peer.

§

PeerRegistered

Fields

§peer: PeerId
§registration: Registration

A peer successfully registered with us.

§

PeerNotRegistered

Fields

§peer: PeerId
§namespace: Namespace
§error: ErrorCode

We declined a registration from a peer.

§

PeerUnregistered

Fields

§peer: PeerId
§namespace: Namespace

A peer successfully unregistered with us.

§

RegistrationExpired(Registration)

A registration from a peer expired.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.