pub struct RuntimeResource {
pub slug: String,
pub title: String,
pub singular: String,
pub per_page: i64,
pub fields: Vec<FieldDef>,
pub columns: Vec<ColumnDef>,
pub data: Arc<dyn RuntimeData>,
}Expand description
A resource defined by data. Build it with new and the
field and column methods, then add it to the panel
with register_runtime.
Fields§
§slug: StringURL segment: "books" serves the resource at /admin/books. Lowercase letters,
digits, - and _ only.
title: StringHeading and navigation label: "Books".
singular: StringThe name of one record, for headings such as “New Book”.
per_page: i64Rows per page on the list view. The default is 20, as for a static resource.
fields: Vec<FieldDef>Form fields, in display order.
columns: Vec<ColumnDef>Table columns, in display order. Each column’s key is a field name.
data: Arc<dyn RuntimeData>Where the rows live.
Implementations§
Trait Implementations§
Source§impl Clone for RuntimeResource
impl Clone for RuntimeResource
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeResource
impl !UnwindSafe for RuntimeResource
impl Forget for RuntimeResource
impl Freeze for RuntimeResource
impl Move for RuntimeResource
impl Send for RuntimeResource
impl Sync for RuntimeResource
impl Unpin for RuntimeResource
impl UnsafeUnpin for RuntimeResource
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 more