Struct db_adapter::slap::SlapReport[][src]

pub struct SlapReport {
    pub sentence: MessageId,
    pub offender: UserId,
    pub enforcer: Enforcer,
    pub reason: Option<String>,
}
Expand description

A single slap object

Fields

sentence: MessageId

Message from which the slap originates

Depending on enforcer, sentence has a different meaning. If it is Enforcer::Community, then sentence points to the message attributed to the reason of the slap. That is to say the one users collectively reacted with the slap emoji. Otherwise it points to the message that issued the slap (so a command message).

offender: UserId

The slapped user.

enforcer: Enforcer

Who delivered the slap.

See Enforcer for more information.

reason: Option<String>

The reason for the slap.

This is None if enforcer is Enforcer::Community or if the default reason was used. The default reason is used when the enforcer doesn’t provide a reason argument when issueing the slap.

Implementations

Retrieves a SlapReport

Returns None if no such slap exists.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more