[−][src]Struct splits_io_api::Race
A Race is a live competition between multiple Runners who share a start time for their run.
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: UuidThe 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: RunnerThe 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: VisibilityThe permission set for the Race.
Implementations
impl Race[src]
pub async fn get_active(client: &Client) -> Result<Vec<Race>, Error>[src]
Gets all the currently active Races on Splits.io.
pub async fn get(client: &Client, id: Uuid) -> Result<Race, Error>[src]
Gets a Race by its ID.
pub async fn create(
client: &Client,
settings: Settings<'_>
) -> Result<Race, Error>[src]
client: &Client,
settings: Settings<'_>
) -> Result<Race, Error>
Creates a new Race.
pub async fn update(
&self,
client: &Client,
settings: UpdateSettings<'_>
) -> Result<Race, Error>[src]
&self,
client: &Client,
settings: UpdateSettings<'_>
) -> Result<Race, Error>
Updates the Race.
pub async fn entries(&self, client: &Client) -> Result<Vec<Entry>, Error>[src]
Gets all of the entries for the Race.
pub async fn my_entry(&self, client: &Client) -> Result<Entry, Error>[src]
Gets the entry in the Race that is associated with the current user.
pub async fn join(
&self,
client: &Client,
join_as: JoinAs<'_>,
join_token: Option<&str>
) -> Result<Entry, Error>[src]
&self,
client: &Client,
join_as: JoinAs<'_>,
join_token: Option<&str>
) -> Result<Entry, Error>
Joins the Race for the given entry.
pub async fn leave(&self, client: &Client, entry_id: Uuid) -> Result<(), Error>[src]
Leaves the Race for the given entry.
pub async fn ready_up(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Declares the given entry as ready for the Race.
pub async fn unready(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Undoes a ready for the given entry in th Race.
pub async fn finish(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Finishes the Race for the given entry.
pub async fn undo_finish(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Undoes a finish for the given entry in the Race.
pub async fn forfeit(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Forfeits the Race for the given entry.
pub async fn undo_forfeit(
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>[src]
&self,
client: &Client,
entry_id: Uuid
) -> Result<Entry, Error>
Undoes a forfeit for the given entry in the Race.
pub async fn chat_messages(
&self,
client: &Client
) -> Result<Vec<ChatMessage>, Error>[src]
&self,
client: &Client
) -> Result<Vec<ChatMessage>, Error>
Gets all of the chat messages for the Race.
pub async fn send_chat_message(
&self,
client: &Client,
message: &str
) -> Result<ChatMessage, Error>[src]
&self,
client: &Client,
message: &str
) -> Result<ChatMessage, Error>
Sends a message in the chat for the Race.
Trait Implementations
impl Debug for Race[src]
impl<'de> Deserialize<'de> for Race[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Race[src]
impl Send for Race[src]
impl Sync for Race[src]
impl Unpin for Race[src]
impl UnwindSafe for Race[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,