pub enum Response {
Show 21 variants
Cancel,
SelectIdleCommand(IdleCommand, u16),
SelectBattleCommand(BattleCommand, u16),
SelectYesNo(bool),
SelectOption(u8),
SelectChain(u8),
DeclineChain,
SelectPosition(Position),
SelectCards(Vec<u16>),
SelectUnselectCards(u16),
SelectTribute(Vec<u16>),
SelectSum(Vec<u16>),
SelectCounter(Vec<u16>),
SelectPlace(CorePlayer, Location, u8),
DeclinePlace,
SortCards(Vec<u16>),
KeepCardOrder,
AnnounceRace(Race),
AnnounceAttribute(Attribute),
AnnounceCard(u32),
Unknown(Vec<u8>),
}Expand description
A player’s response to a select prompt.
Each variant answers a particular gm::MessageType:
the response is only meaningful together with the GameMessage that prompted it.
Unknown holds the raw bytes when the prompting message type is not known.
Variants§
Cancel
Answers SelectCard /
SelectUnselectCard /
SelectTribute, meaning decline.
SelectIdleCommand(IdleCommand, u16)
Answers SelectIdleCommand.
SelectBattleCommand(BattleCommand, u16)
Answers SelectBattleCommand.
SelectYesNo(bool)
Answers SelectYesNo /
SelectEffectYesNo.
SelectOption(u8)
Answers SelectOption /
AnnounceNumber.
SelectChain(u8)
Answers SelectChain.
DeclineChain
Answers SelectChain, meaning decline.
SelectPosition(Position)
Answers SelectPosition.
SelectCards(Vec<u16>)
Answers SelectCard.
SelectUnselectCards(u16)
Answers SelectUnselectCard.
SelectTribute(Vec<u16>)
Answers SelectTribute.
SelectSum(Vec<u16>)
Answers SelectSum.
SelectCounter(Vec<u16>)
Answers SelectCounter.
SelectPlace(CorePlayer, Location, u8)
Answers SelectPlace /
SelectDisableField.
DeclinePlace
Answers SelectPlace /
SelectDisableField, meaning decline.
SortCards(Vec<u16>)
Answers SortCard.
KeepCardOrder
Answers SortCard, meaning keep the card order.
AnnounceRace(Race)
Answers AnnounceRace.
AnnounceAttribute(Attribute)
Answers AnnounceAttribute.
AnnounceCard(u32)
Answers AnnounceCard.
Unknown(Vec<u8>)
Raw bytes, when the prompting message type is unknown.
Implementations§
Trait Implementations§
Source§impl BinRead for Response
impl BinRead for Response
Source§type Args<'a> = Option<MessageType>
type Args<'a> = Option<MessageType>
Source§fn read_options<R: Read + Seek>(
reader: &mut R,
endian: Endian,
message_type: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( reader: &mut R, endian: Endian, message_type: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for Response
impl BinWrite for Response
Source§fn write_options<W: Write + Seek>(
&self,
writer: &mut W,
endian: Endian,
_args: (),
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, writer: &mut W, endian: Endian, _args: (), ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read more