pub enum Request<A> {
Query,
Act(A),
}Expand description
A message from a client to whichever process holds the authoritative state.
A is a game’s Action type. The action is carried by value so a host can
move it straight into Game::apply without cloning.
Variants§
Query
Ask for the requesting seat’s current view, with no side effects.
Act(A)
Submit an action to apply.
Trait Implementations§
Source§impl<'de, A> Deserialize<'de> for Request<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for Request<A>where
A: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<A: PartialEq> PartialEq for Request<A>
impl<A: PartialEq> PartialEq for Request<A>
impl<A: Eq> Eq for Request<A>
impl<A> StructuralPartialEq for Request<A>
Auto Trait Implementations§
impl<A> Freeze for Request<A>where
A: Freeze,
impl<A> RefUnwindSafe for Request<A>where
A: RefUnwindSafe,
impl<A> Send for Request<A>where
A: Send,
impl<A> Sync for Request<A>where
A: Sync,
impl<A> Unpin for Request<A>where
A: Unpin,
impl<A> UnsafeUnpin for Request<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Request<A>where
A: UnwindSafe,
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