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
DesiredGameStatein 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
impl DesiredGameState
Sourcepub fn builder() -> DesiredGameStateBuilder<()>
pub fn builder() -> DesiredGameStateBuilder<()>
Creates a DesiredGameStateBuilder for serializing an instance of this table.
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
impl Clone for DesiredGameState
Source§fn clone(&self) -> DesiredGameState
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DesiredGameState
impl Debug for DesiredGameState
Source§impl Default for DesiredGameState
impl Default for DesiredGameState
Source§fn default() -> DesiredGameState
fn default() -> DesiredGameState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DesiredGameState
impl<'de> Deserialize<'de> for DesiredGameState
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DesiredGameState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
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
impl DesiredGameStateExt for DesiredGameState
Source§fn mod_match_info(&mut self, build: impl FnOnce(&mut DesiredMatchInfo))
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))
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))>,
)
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))
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))>,
)
fn mod_balls( &mut self, build: impl IntoIterator<Item = (usize, impl Fn(&mut DesiredBallState))>, )
Modify all desired balls.
Source§impl From<DesiredGameState> for InterfaceMessage
impl From<DesiredGameState> for InterfaceMessage
Source§fn from(value: DesiredGameState) -> InterfaceMessage
fn from(value: DesiredGameState) -> InterfaceMessage
Converts to this type from the input type.
Source§impl PartialEq for DesiredGameState
impl PartialEq for DesiredGameState
Source§impl PartialOrd for DesiredGameState
impl PartialOrd for DesiredGameState
Source§impl Serialize for DesiredGameState
impl Serialize for DesiredGameState
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
impl StructuralPartialEq for DesiredGameState
Source§impl<'a> TryFrom<DesiredGameStateRef<'a>> for DesiredGameState
impl<'a> TryFrom<DesiredGameStateRef<'a>> for DesiredGameState
impl VectorWrite<Offset<DesiredGameState>> for DesiredGameState
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<DesiredGameState>> for DesiredGameState
impl WriteAsOffset<DesiredGameState> for DesiredGameState
impl<T0, T1, T2> WriteAsOffset<DesiredGameState> for DesiredGameStateBuilder<(T0, T1, T2)>where
T0: WriteAs<Offset<[Offset<DesiredBallState>]>>,
T1: WriteAs<Offset<[Offset<DesiredCarState>]>>,
T2: WriteAsOptional<Offset<DesiredMatchInfo>>,
impl WriteAsOptional<Offset<DesiredGameState>> for DesiredGameState
Auto Trait Implementations§
impl Freeze for DesiredGameState
impl RefUnwindSafe for DesiredGameState
impl Send for DesiredGameState
impl Sync for DesiredGameState
impl Unpin for DesiredGameState
impl UnsafeUnpin for DesiredGameState
impl UnwindSafe for DesiredGameState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more