[][src]Enum ultra_tournament::TournamentNode

pub enum TournamentNode<M: Debug + Display + Clone + Default> {
    Entrant(EntrantId),
    Round(TournamentRound<M>),
}

The node weight of a Tournament's internal graph.

Variants

Entrant(EntrantId)

Represents the starting point of an entrant within the tournament bracket. Links to exactly one Round node.

Round(TournamentRound<M>)

Represents a round in the tournament. Links to two previous rounds or entrant nodes, and one future round node (except for the final round)

Implementations

impl<M: Debug + Display + Clone + Default> TournamentNode<M>[src]

pub fn entrant(&self) -> Option<&EntrantId>[src]

Get the entrant of the node. Returns None if the node is a TournamentNode::Round

pub fn round(&self) -> Option<&TournamentRound<M>>[src]

Get the round of the node. Returns None if the node is a TournamentNode::Entrant

pub fn metadata(&self) -> Option<&M>[src]

Get the metadata of a node. Returns None if the node is a TournamentNode::Entrant, or is incomplete.

pub fn metadata_mut(&mut self) -> Option<&mut M>[src]

Get a mutable reference to the metadata of a node. Returns None if the node is a TournamentNode::Entrant, or is incomplete.

pub fn result(&self) -> Option<&TournamentRoundResult>[src]

Get the result of a node. Returns None if the node is a TournamentNode::Entrant, or is incomplete.

Trait Implementations

impl<M: Clone + Debug + Display + Default> Clone for TournamentNode<M>[src]

impl<M: Copy + Debug + Display + Clone + Default> Copy for TournamentNode<M>[src]

impl<M: Debug + Display + Clone + Default> Debug for TournamentNode<M>[src]

impl<M: Debug + Display + Clone + Default> Display for TournamentNode<M>[src]

Auto Trait Implementations

impl<M> RefUnwindSafe for TournamentNode<M> where
    M: RefUnwindSafe

impl<M> Send for TournamentNode<M> where
    M: Send

impl<M> Sync for TournamentNode<M> where
    M: Sync

impl<M> Unpin for TournamentNode<M> where
    M: Unpin

impl<M> UnwindSafe for TournamentNode<M> where
    M: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,