pub struct Chrome {
pub title: String,
pub close: Option<String>,
pub tab: Option<Tab>,
}Expand description
Top-bar and tab-bar state for one page.
Fields§
§title: StringBar text and the <title> tag.
close: Option<String>Some(href) renders a focused flow: ✕ to href, centered title,
no tab bar. None renders a left-aligned title and the tab bar,
whose More item carries the overflow menu.
tab: Option<Tab>The lit tab. None with close: None shows the bar with nothing
lit (admin, invites).
Implementations§
Source§impl Chrome
impl Chrome
Sourcepub fn tabbed(title: impl Into<String>, tab: Tab) -> Self
pub fn tabbed(title: impl Into<String>, tab: Tab) -> Self
A browsing page: tab bar with tab lit.
Sourcepub fn unlit(title: impl Into<String>) -> Self
pub fn unlit(title: impl Into<String>) -> Self
A browsing page outside the four tabs: tab bar, nothing lit.
Sourcepub fn focused(title: impl Into<String>, close: impl Into<String>) -> Self
pub fn focused(title: impl Into<String>, close: impl Into<String>) -> Self
A focused flow: ✕ to close, centered title, no tab bar.
pub fn is_current(&self) -> bool
pub fn is_standings(&self) -> bool
pub fn is_contests(&self) -> bool
pub fn is_my_team(&self) -> bool
Auto Trait Implementations§
impl Freeze for Chrome
impl RefUnwindSafe for Chrome
impl Send for Chrome
impl Sync for Chrome
impl Unpin for Chrome
impl UnsafeUnpin for Chrome
impl UnwindSafe for Chrome
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