pub struct Message {
    pub id: i64,
    pub event_type: PushEventType,
}
Expand description

Struct encompasses a message we are trying to relay to a client from somehwere within dim. It holds an id and a event_type field.

Fields

id: i64

Field id, can hold anything and the client usually discriminates its meaning based on the event_type. For example within dim, sometimes it can be the library_id or media_id or sometimes its just -1 meaning ignore

event_type: PushEventType

Field holds the event type that gets relayed to the clients.

Trait Implementations

Serialize this value into the given Serde serializer. Read more

Converts the given value to a String. 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.

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.