pub struct TableTab<M: Model> { /* private fields */ }Expand description
A view of a resource’s table that narrows it to some of its records, such as the orders that are still pending. Tabs appear above the table as cards, each with a live count of its records.
Implementations§
Source§impl<M: Model> TableTab<M>
impl<M: Model> TableTab<M>
Sourcepub fn new<F>(
key: impl Into<String>,
label: impl Into<String>,
modifier: F,
) -> Self
pub fn new<F>( key: impl Into<String>, label: impl Into<String>, modifier: F, ) -> Self
A tab with a key for URLs, a label, and a closure that narrows the query to the tab’s records.
Sourcepub fn all(label: impl Into<String>) -> Self
pub fn all(label: impl Into<String>) -> Self
A tab that shows every record, usually the first one. Its key is all.
Sourcepub fn color(self, color: BadgeColor) -> Self
pub fn color(self, color: BadgeColor) -> Self
Shows a dot of this color before the tab’s label, to match the badges of its records.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for TableTab<M>
impl<M> !UnwindSafe for TableTab<M>
impl<M> Forget for TableTab<M>
impl<M> Freeze for TableTab<M>
impl<M> Move for TableTab<M>
impl<M> Send for TableTab<M>
impl<M> Sync for TableTab<M>
impl<M> Unpin for TableTab<M>
impl<M> UnsafeUnpin for TableTab<M>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Fn(Builder<M>) -> Builder<M> + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(Builder<M>) -> Builder<M> + Send + Sync>>: UnsafeUnpin,
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<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more