[][src]Trait cetkaik_full_state_transition::message::binary::Binary

pub trait Binary where
    Self: Sized
{ pub fn to_binary(&self) -> u32;
pub fn from_binary(b: u32) -> Result<Self, &'static str>; #[must_use] pub fn random_choice() -> Self { ... } }
  • bit 28-31: tag (See Tag for details)

If tag is nonzero:

  • bit 0-6: src
  • bit 7-13: step
  • bit 14-20: first_dest
  • bit 21-27: second_dest / dest / planned_direction

If tag is zero, then the encoded value is NormalMove::NonTamMoveFromHopZuo;

  • bit 0-7: prof
  • bit 8: color (0 if red; 1 if black)
  • bit 9-20: zero bits
  • bit 21-27: dest

Required methods

pub fn to_binary(&self) -> u32[src]

pub fn from_binary(b: u32) -> Result<Self, &'static str>[src]

Loading content...

Provided methods

#[must_use]pub fn random_choice() -> Self[src]

Loading content...

Implementors

impl Binary for NormalMove[src]

impl Binary for AfterHalfAcceptance[src]

impl Binary for InfAfterStep[src]

Loading content...