[][src]Enum retrosheet::event::Event

pub enum Event {
    GameId {
        id: String,
    },
    Version {
        version: u8,
    },
    Info {
        key: Info,
        data: String,
    },
    Start {
        player: Player,
    },
    Sub {
        player: Player,
    },
    Play {
        inning: u8,
        team: Team,
        player: PlayerId,
        count: Option<(u8, u8)>,
        pitches: Vec<Pitch>,
        event: PlayEvent,
    },
    Data {
        data_type: DataEventType,
        player: PlayerId,
        value: String,
    },
    Comment {
        comment: String,
    },
    BattingAdjustment {
        player: PlayerId,
        hand: Hand,
    },
    PitchingAdjustment {
        player: PlayerId,
        hand: Hand,
    },
    LineupAdjustment {
        team: Team,
        position: u8,
    },
}

A record describing something about an MLB game.

Variants

GameId

A twelve character ID record which identifies the date, home team, and number of the game.

Fields of GameId

id: String

The game ID.

Version

A record identifying version information. The version is obsolete and can be ignored.

Fields of Version

version: u8

The version of the game data.

Info

A record identifying game information.

Fields of Info

key: Info

The type of information in the record.

data: String

The information in the record. Just stored as a string, though it can describe a variety of data.

Start

A record identifying a starter in the game.

Fields of Start

player: Player

The player starting.

Sub

A record identifying a substitution of a player in the game.

Fields of Sub

player: Player

The player being subbed in.

Play

A record identifying a play occurring during a game.

Fields of Play

inning: u8

The inning, an integer starting at 1

team: Team

The team which is batting.

player: PlayerId

The player at the plate.

count: Option<(u8, u8)>

The count on the batter at the time of the play. Some older games may not have this information, hence why this is optional.

pitches: Vec<Pitch>

The pitches the batter saw. Some games don't have this data, hence this may be empty.

event: PlayEvent

A description of the events of the play.

Data

A record describing some data about the game. Currently there's only earned run information but in the future more records may exist.

Fields of Data

data_type: DataEventType

The data record type.

player: PlayerId

The player to which the record applies.

value: String

The actual data value.

Comment

A record describing a comment of some sort. Can be just an additional note to an unusual play, or a description of a review.

Fields of Comment

comment: String

The comment itself.

BattingAdjustment

A record describing a batting adjustment; i.e. when a batter bats from a side that is unexpected.

Fields of BattingAdjustment

player: PlayerId

The player to whom the adjustment applies.

hand: Hand

The hand with which they are batting for this instance.

PitchingAdjustment

A record describing a pitching adjustment; i.e. when a pitcher pitches from a side that is unexpected. This has actually only ever happened once, but it is possible.

Fields of PitchingAdjustment

player: PlayerId

The player to whom the adjustment applies.

hand: Hand

The hand with which they are pitching for this instance.

LineupAdjustment

A record used when teams bat out of order. The normal assumption is that proper lineup sequence is followed, therefore, it is necessary to have some special indication when this is violated.

Fields of LineupAdjustment

team: Team

The team which batted out of order.

position: u8

The batting order position.

Trait Implementations

impl Clone for Event[src]

impl PartialEq<Event> for Event[src]

impl Debug for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

impl RefUnwindSafe for Event

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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