pub struct BattingOrderIndex {
pub major: usize,
pub minor: usize,
}Expand description
A position in the batting order, 1st, 2nd, 3rd, 4th, etc.
Note that this number is split in two, the general batting order position is the major while if there is a lineup movement then the player would have an increased minor since they replace an existing batting order position.
Example: Alice bats 1st (major = 1, minor = 0) Bob pinch hits and bats 1st for Alice (major = 1, minor = 1) Alice somehow hits again (major = 1, minor = 0) Charlie pinch runs and takes over from then on (major = 1, minor = 2)
Note: These minors are Displayed incremented one more than is done internally, so (major = 1, minor = 1) displays as 1st (2).
Fields§
§major: usize§minor: usizeTrait Implementations§
Source§impl Clone for BattingOrderIndex
impl Clone for BattingOrderIndex
Source§fn clone(&self) -> BattingOrderIndex
fn clone(&self) -> BattingOrderIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BattingOrderIndex
impl Debug for BattingOrderIndex
Source§impl<'de> Deserialize<'de> for BattingOrderIndex
impl<'de> Deserialize<'de> for BattingOrderIndex
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
Source§impl Display for BattingOrderIndex
impl Display for BattingOrderIndex
Source§impl PartialEq for BattingOrderIndex
impl PartialEq for BattingOrderIndex
impl Copy for BattingOrderIndex
impl StructuralPartialEq for BattingOrderIndex
Auto Trait Implementations§
impl Freeze for BattingOrderIndex
impl RefUnwindSafe for BattingOrderIndex
impl Send for BattingOrderIndex
impl Sync for BattingOrderIndex
impl Unpin for BattingOrderIndex
impl UnsafeUnpin for BattingOrderIndex
impl UnwindSafe for BattingOrderIndex
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.