[−][src]Struct pusoy_dos2::game::Player
Methods
impl Player
[src]
pub fn new(id: String, hand: Vec<Card>) -> Player
[src]
pub fn get_id(&self) -> &str
[src]
pub fn get_hand(&self) -> Vec<Card>
[src]
pub fn get_card_count(&self) -> usize
[src]
pub fn play_move(
&mut self,
cards: Vec<PlayedCard>
) -> Result<Player, PlayerError>
[src]
&mut self,
cards: Vec<PlayedCard>
) -> Result<Player, PlayerError>
pub fn has_card(&self, card: &Card) -> bool
[src]
Trait Implementations
impl Clone for Player
[src]
fn clone(&self) -> Player
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<Player> for JsValue
[src]
impl Debug for Player
[src]
impl FromWasmAbi for Player
[src]
type Abi = u32
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
unsafe fn from_abi(js: u32, _extra: &mut dyn Stack) -> Self
[src]
impl WasmDescribe for Player
[src]
impl IntoWasmAbi for Player
[src]
type Abi = u32
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
fn into_abi(self, _extra: &mut dyn Stack) -> u32
[src]
impl OptionIntoWasmAbi for Player
[src]
impl OptionFromWasmAbi for Player
[src]
impl RefFromWasmAbi for Player
[src]
type Abi = u32
The wasm ABI type references to Self
are recovered from.
type Anchor = Ref<'static, Player>
The type that holds the reference to Self
for the duration of the invocation of the function that has an &Self
parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more
unsafe fn ref_from_abi(js: Self::Abi, _extra: &mut dyn Stack) -> Self::Anchor
[src]
impl RefMutFromWasmAbi for Player
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
[src]
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi