[][src]Enum ttb::ReaderEvent

pub enum ReaderEvent<'a> {
    Meta {
        build_name: &'a str,
        build_description: &'a str,
    },
    Color {
        id: u8,
        color: RgbaU8,
    },
    Brick {
        brick_type: &'a str,
        x: i32,
        y: i32,
        z: i32,
        orientation: u8,
        color_id: u8,
    },
}

An event returned by Reader::next_event.

Variants

Meta

The metadata of a build has been encountered.

Fields of Meta

build_name: &'a str

The name of the build

build_description: &'a str

The description of the build

Color

A color in the palette has been encountered.

Fields of Color

id: u8

The id of the color

color: RgbaU8

The color

Brick

A brick has been encountered.

Fields of Brick

brick_type: &'a str

The name of the type of brick

x: i32

The x coordinate of the minimum point of this brick

y: i32

The y coordinate of the minimum point of this brick

z: i32

The z coordinate of the minimum point of this brick

orientation: u8

The orientation of this brick, this is guaranteed to be in the 0..=3 range.

color_id: u8

The color id of a brick, this is guaranteed to be within the palette.

Trait Implementations

impl<'a> Clone for Event<'a>[src]

impl<'a> Debug for Event<'a>[src]

impl<'a> Eq for Event<'a>[src]

impl<'a> PartialEq<Event<'a>> for Event<'a>[src]

impl<'a> StructuralEq for Event<'a>[src]

impl<'a> StructuralPartialEq for Event<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Event<'a>

impl<'a> Send for Event<'a>

impl<'a> Sync for Event<'a>

impl<'a> Unpin for Event<'a>

impl<'a> UnwindSafe for Event<'a>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.