pub struct Persona<X> {
pub settings: PlanSettings,
pub weights: BTreeMap<String, i32>,
pub game: X,
}Expand description
One kind of player: how it thinks, what it cares about, and the
game’s own extras X (a game mode, a difficulty; () for none).
Fields§
§settings: PlanSettingsHow its planner thinks.
weights: BTreeMap<String, i32>What it cares about each feature, by the game’s names. A feature left out weighs 0.
game: XThe game’s own extras; their default when left out.
Implementations§
Trait Implementations§
Source§impl<'de, X> Deserialize<'de> for Persona<X>where
X: Default + Deserialize<'de>,
impl<'de, X> Deserialize<'de> for Persona<X>where
X: Default + 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
impl<X: Eq> Eq for Persona<X>
impl<X: PartialEq> StructuralPartialEq for Persona<X>
Auto Trait Implementations§
impl<X> Freeze for Persona<X>where
X: Freeze,
impl<X> RefUnwindSafe for Persona<X>where
X: RefUnwindSafe,
impl<X> Send for Persona<X>where
X: Send,
impl<X> Sync for Persona<X>where
X: Sync,
impl<X> Unpin for Persona<X>where
X: Unpin,
impl<X> UnsafeUnpin for Persona<X>where
X: UnsafeUnpin,
impl<X> UnwindSafe for Persona<X>where
X: 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