pub struct EditorPage {
pub contest_name: String,
pub team_name: String,
pub cap: CapState,
pub slots: Vec<EditorSlotRow>,
pub locked: bool,
pub entry_id: Option<EntryId>,
}Expand description
The editor page: cap state, the nine rows, and whether the slate is read-only.
Fields§
§contest_name: String§team_name: String§cap: CapState§slots: Vec<EditorSlotRow>§locked: bool§entry_id: Option<EntryId>The committed entry, when one exists: the first save creates it, later saves update it.
Implementations§
Source§impl EditorPage
impl EditorPage
Sourcepub fn save_label(&self) -> &'static str
pub fn save_label(&self) -> &'static str
The commit action: "Save Entry" first, "Update Entry" after.
Sourcepub fn discard_label(&self) -> &'static str
pub fn discard_label(&self) -> &'static str
Abandoning the draft only loses unsaved work; the committed entry, if any, stays.
pub fn over_cap(&self) -> bool
Sourcepub fn remaining_str(&self) -> String
pub fn remaining_str(&self) -> String
The band’s headline amount: what’s left under the cap, or the overage (unsigned — the “over the salary cap” label carries the sign).
Auto Trait Implementations§
impl Freeze for EditorPage
impl RefUnwindSafe for EditorPage
impl Send for EditorPage
impl Sync for EditorPage
impl Unpin for EditorPage
impl UnsafeUnpin for EditorPage
impl UnwindSafe for EditorPage
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
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