pub struct Battle {
pub battle_time: TimeLike,
pub event: BattleEvent,
pub result: BattleResultInfo,
}Expand description
Represents a Battle in a player’s BattleLog.
Fields§
§battle_time: TimeLikeThe time at which this battle occurred, in ISO format.
event: BattleEventData about the event in which this battle occurred.
result: BattleResultInfoData about the battle itself and its outcome.
Trait Implementations§
Source§impl Default for Battle
impl Default for Battle
Source§fn default() -> Battle
fn default() -> Battle
Returns a default Battle instance, with all default values initialized.
§Examples
use brawl_api::{Battle, BattleEvent, BattleResultInfo, TimeLike};
assert_eq!(
Battle::default(),
Battle {
battle_time: TimeLike::default(),
event: BattleEvent::default(),
result: BattleResultInfo::default()
}
)Source§impl<'de> Deserialize<'de> for Battle
impl<'de> Deserialize<'de> for Battle
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 Eq for Battle
impl StructuralPartialEq for Battle
Auto Trait Implementations§
impl Freeze for Battle
impl RefUnwindSafe for Battle
impl Send for Battle
impl Sync for Battle
impl Unpin for Battle
impl UnwindSafe for Battle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FetchFrom<T> for T
impl<T> FetchFrom<T> for T
Source§fn fetch_from(_: &Client, t: &T) -> Result<T, Error>
fn fetch_from(_: &Client, t: &T) -> Result<T, Error>
(Sync) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable.
§Errors
Never errors; is only a Result in order to match the trait signature.
Source§fn a_fetch_from<'life0, 'life1, 'async_trait>(
_: &'life0 Client,
t: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn a_fetch_from<'life0, 'life1, 'async_trait>(
_: &'life0 Client,
t: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
(Async) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable.
§Errors
Never errors; is only a Result in order to match the trait signature.
Source§impl<T, U> FetchInto<U> for T
impl<T, U> FetchInto<U> for T
Source§fn fetch_into(&self, client: &Client) -> Result<U, Error>
fn fetch_into(&self, client: &Client) -> Result<U, Error>
(Sync) Attempts to request to the API and return a new instance of the type being turned
into. Read more
Source§fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 Client,
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait,
T: 'async_trait,
fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 Client,
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait,
T: 'async_trait,
(Async) Attempts to request to the API and return a new instance of the type being turned
into. Read more