pub enum RosterSlot {
Qb,
Rb1,
Rb2,
Wr1,
Wr2,
Wr3,
Te,
Flex,
Def,
}Expand description
A lineup’s nine roster slots. Stored as TEXT ("QB", "RB1", …) in
entry_slots.roster_slot; the sqlx derive decodes that column directly.
Variants§
Implementations§
Source§impl RosterSlot
impl RosterSlot
Sourcepub fn position_label(self) -> &'static str
pub fn position_label(self) -> &'static str
The position a slot draws from, without its ordinal: Rb1 and Rb2
are both "RB". This is the display label the entry page shows, kept
next to the slot so a new variant cannot drift from its label.
Sourcepub fn is_defense(self) -> bool
pub fn is_defense(self) -> bool
Whether this slot takes a team defense rather than a player.
Sourcepub fn search_placeholder(self) -> String
pub fn search_placeholder(self) -> String
What the picker’s search field invites you to type. FLEX and DEF get words because “Search FLEXs” and “Search DEFs” don’t read as English.
Sourcepub fn parse_value(self, raw: String) -> Result<PlayerOrDefenseId, String>
pub fn parse_value(self, raw: String) -> Result<PlayerOrDefenseId, String>
Parse the picker’s submitted value into what this slot holds. The slot decides whether the string is a player id or a team abbr.
Sourcepub fn search_noun(self) -> &'static str
pub fn search_noun(self) -> &'static str
The picker’s empty-state noun: “No defenses match …” for DEF.
pub fn dom_id(self) -> &'static str
Trait Implementations§
Source§impl Clone for RosterSlot
impl Clone for RosterSlot
impl Copy for RosterSlot
Source§impl Debug for RosterSlot
impl Debug for RosterSlot
Source§impl<'r> Decode<'r, Sqlite> for RosterSlot
impl<'r> Decode<'r, Sqlite> for RosterSlot
Source§impl Display for RosterSlot
impl Display for RosterSlot
Source§impl<'q, DB: Database> Encode<'q, DB> for RosterSlotwhere
&'q str: Encode<'q, DB>,
impl<'q, DB: Database> Encode<'q, DB> for RosterSlotwhere
&'q str: Encode<'q, DB>,
Source§fn encode_by_ref(
&self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <DB as Database>::ArgumentBuffer, ) -> Result<IsNull, BoxDynError>
fn size_hint(&self) -> usize
§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
impl Eq for RosterSlot
Source§impl FromStr for RosterSlot
impl FromStr for RosterSlot
Source§impl Hash for RosterSlot
impl Hash for RosterSlot
Source§impl IntoEnumIterator for RosterSlot
impl IntoEnumIterator for RosterSlot
type Iterator = RosterSlotIter
fn iter() -> RosterSlotIter ⓘ
Source§impl PartialEq for RosterSlot
impl PartialEq for RosterSlot
impl StructuralPartialEq for RosterSlot
Source§impl TryFrom<&str> for RosterSlot
impl TryFrom<&str> for RosterSlot
Auto Trait Implementations§
impl Freeze for RosterSlot
impl RefUnwindSafe for RosterSlot
impl Send for RosterSlot
impl Sync for RosterSlot
impl Unpin for RosterSlot
impl UnsafeUnpin for RosterSlot
impl UnwindSafe for RosterSlot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more