Skip to main content

Action

Type Alias Action 

Source
pub type Action = Decision;
Expand description

The answer to a decision hook: the contract’s decision variant.

Each hook accepts a subset; an answer outside it counts as a failed call:

Aliased Type§

pub enum Action {
    Continue,
    Deny(Text),
    Server(String),
    Message(Text),
    Queue(String),
    LeaveQueue,
}

Variants§

§

Continue

§

Deny(Text)

§

Server(String)

§

Message(Text)

§

Queue(String)

§

LeaveQueue

Implementations§

Source§

impl Action

Source

pub fn deny(reason: impl Into<Text>) -> Self

deny(reason): refuse, and show the player the reason.

Source

pub fn message(text: impl Into<Text>) -> Self

message(text): reply to whoever ran a command.

Source

pub fn server(name: impl Into<String>) -> Self

server(name): send the player to a backend.

Source

pub fn queue(name: impl Into<String>) -> Self

queue(name): put the player into the queue for a backend.

Trait Implementations§

Source§

impl PartialEq for Action

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more