Skip to main content

DesiredGameState

Struct DesiredGameState 

Source
pub struct DesiredGameState {
    pub ball_states: Vec<DesiredBallState>,
    pub car_states: Vec<DesiredCarState>,
    pub match_info: Option<Box<DesiredMatchInfo>>,
}
Expand description

A game state with nullable subcomponents. Used for game state setting to define which part of the game should change. Values not set will not be updated.

Generated from these locations:

  • Table DesiredGameState in the file /home/virx/Documents/rust-interface/flatbuffers-schema/schema/gamestatemanip.fbs:77

Fields§

§ball_states: Vec<DesiredBallState>

A list of desired ball states.

§car_states: Vec<DesiredCarState>

A list of desired car states.

§match_info: Option<Box<DesiredMatchInfo>>

The desired game info.

Implementations§

Source§

impl DesiredGameState

Source

pub fn builder() -> DesiredGameStateBuilder<()>

Creates a DesiredGameStateBuilder for serializing an instance of this table.

Source

pub fn create( builder: &mut Builder, field_ball_states: impl WriteAs<Offset<[Offset<DesiredBallState>]>>, field_car_states: impl WriteAs<Offset<[Offset<DesiredCarState>]>>, field_match_info: impl WriteAsOptional<Offset<DesiredMatchInfo>>, ) -> Offset<DesiredGameState>

Trait Implementations§

Source§

impl Clone for DesiredGameState

Source§

fn clone(&self) -> DesiredGameState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DesiredGameState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for DesiredGameState

Source§

fn default() -> DesiredGameState

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DesiredGameState

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DesiredGameState, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl DesiredGameStateExt for DesiredGameState

Source§

fn mod_match_info(&mut self, build: impl FnOnce(&mut DesiredMatchInfo))

Modify the desired match info.

Source§

fn mod_car(&mut self, index: usize, build: impl FnOnce(&mut DesiredCarState))

Modify the desired car at the given index.

Source§

fn mod_cars( &mut self, build: impl IntoIterator<Item = (usize, impl Fn(&mut DesiredCarState))>, )

Modify all desired cars.

Source§

fn mod_ball(&mut self, index: usize, build: impl FnOnce(&mut DesiredBallState))

Modify the desired ball at the given index.

Source§

fn mod_balls( &mut self, build: impl IntoIterator<Item = (usize, impl Fn(&mut DesiredBallState))>, )

Modify all desired balls.

Source§

impl From<DesiredGameState> for InterfaceMessage

Source§

fn from(value: DesiredGameState) -> InterfaceMessage

Converts to this type from the input type.
Source§

impl PartialEq for DesiredGameState

Source§

fn eq(&self, other: &DesiredGameState) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for DesiredGameState

Source§

fn partial_cmp(&self, other: &DesiredGameState) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for DesiredGameState

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DesiredGameState

Source§

impl<'a> TryFrom<DesiredGameStateRef<'a>> for DesiredGameState

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: DesiredGameStateRef<'a>) -> Result<DesiredGameState, Error>

Performs the conversion.
Source§

impl VectorWrite<Offset<DesiredGameState>> for DesiredGameState

§Safety

The planus compiler generates implementations that initialize the bytes in write_values.

Source§

impl WriteAs<Offset<DesiredGameState>> for DesiredGameState

Source§

impl WriteAsOffset<DesiredGameState> for DesiredGameState

Source§

impl<T0, T1, T2> WriteAsOffset<DesiredGameState> for DesiredGameStateBuilder<(T0, T1, T2)>

Source§

impl WriteAsOptional<Offset<DesiredGameState>> for DesiredGameState

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.