[−][src]Struct spyparty::replay::Replay
A SpyParty replay.
This contains a few useful functions for dealing with a replay, such as checking if a replay contains a specific player.
Fields
header: Header
The header of the replay.
This contains all the information describing the game.
Methods
impl Replay
[src]
pub fn from_reader<R: Read>(reader: &mut R) -> Result<Replay>
[src]
Create a new replay from a reader.
pub fn spy_name(&self) -> &String
[src]
pub fn sniper_name(&self) -> &String
[src]
pub fn has_player(&self, name: &str) -> bool
[src]
Checks if the replay contains a particular player.
pub fn has_spy(&self, name: &str) -> bool
[src]
Checks if the spy in this replay is a particular player.
pub fn has_sniper(&self, name: &str) -> bool
[src]
Checks if the sniper in this replay is a particular player.
pub fn is_spy_win(&self) -> bool
[src]
Checks if the replay ends in a spy win.
pub fn is_sniper_win(&self) -> bool
[src]
Checks if the replay ends in a sniper win.
pub fn is_win_for(&self, name: &str) -> bool
[src]
Checks if the replay ends with a win for a particular player.
pub fn is_loss_for(&self, name: &str) -> bool
[src]
Checks if the replay ends with a loss for a particular player.
This is not simply the inverse of is_win_for
because replays can be in an unfinished
state.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Replay
impl Send for Replay
impl Sync for Replay
impl Unpin for Replay
impl UnwindSafe for Replay
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,