Struct splits_io_api::Race

source ·
pub struct Race {
Show 14 fields pub attachments: Vec<Attachment>, pub category: Option<Category>, pub chat_messages: Vec<ChatMessage>, pub created_at: Box<str>, pub entries: Vec<Entry>, pub game: Option<Game>, pub id: Uuid, pub join_token: Option<Box<str>>, pub notes: Option<Box<str>>, pub owner: Runner, pub path: Box<str>, pub started_at: Option<Box<str>>, pub updated_at: Box<str>, pub visibility: Visibility,
}
Expand description

A Race is a live competition between multiple Runners who share a start time for their run.

API Documentation

Fields§

§attachments: Vec<Attachment>

Any attachments supplied by the race creator for the benefit of other entrants (e.g. for randomizers).

§category: Option<Category>

The category being raced.

§chat_messages: Vec<ChatMessage>

Chat messages for the Race. Only present when fetching the Race individually.

§created_at: Box<str>

The time and date at which this Race was created on Splits.io. This field conforms to ISO 8601.

§entries: Vec<Entry>

All Entries currently in the Race.

§game: Option<Game>

The game being raced.

§id: Uuid

The unique ID of the Race.

§join_token: Option<Box<str>>

The token needed to join the race if it’s invite-only or secret. Only provided to the owner as a response to creation.

§notes: Option<Box<str>>

Any notes associatied with the Race.

§owner: Runner

The Runner who created the Race.

§path: Box<str>

The user-friendly URL to the Race, to be given to a user when necessary.

§started_at: Option<Box<str>>

The time and date at which this Race was started on Splits.io. This field conforms to ISO 8601.

§updated_at: Box<str>

The time and date at which this Race was most recently modified on Splits.io. This field conforms to ISO 8601.

§visibility: Visibility

The permission set for the Race.

Implementations§

Gets all the currently active Races on Splits.io.

Gets a Race by its ID.

Creates a new Race.

Updates the Race.

Gets all of the entries for the Race.

source

pub async fn my_entry(&self, client: &Client) -> Result<Entry, Error>

Gets the entry in the Race that is associated with the current user.

Joins the Race for the given entry.

Leaves the Race for the given entry.

Declares the given entry as ready for the Race.

Undoes a ready for the given entry in th Race.

Finishes the Race for the given entry.

Undoes a finish for the given entry in the Race.

Forfeits the Race for the given entry.

Undoes a forfeit for the given entry in the Race.

Gets all of the chat messages for the Race.

Sends a message in the chat for the Race.

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. 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.

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

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.
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