#[non_exhaustive]pub enum ResourcePage {
Create,
View,
}Expand description
A record page a resource serves beside its list, unless
without_page turns it off.
A resource serves its list, and these pages by default:
- the create page and the edit page, when it has a record form: a resource whose
FormisNoFormserves neither; - the view page, which shows its
detail.
The policy decides who may open a page, per request, but never whether it exists.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Create
The create page, for a resource whose records arrive another way: a seed, an action.
Without it, mounting skips the check that a create fills every non-nullable column, the
list and the relations offer no create button, and an
importable resource refuses to mount.
View
The view page. Turned off, its route answers 404 and no row links to it.
Trait Implementations§
Source§impl Clone for ResourcePage
impl Clone for ResourcePage
impl Copy for ResourcePage
Source§impl Debug for ResourcePage
impl Debug for ResourcePage
impl Eq for ResourcePage
Source§impl PartialEq for ResourcePage
impl PartialEq for ResourcePage
impl StructuralPartialEq for ResourcePage
Auto Trait Implementations§
impl Forget for ResourcePage
impl Freeze for ResourcePage
impl Move for ResourcePage
impl RefUnwindSafe for ResourcePage
impl Send for ResourcePage
impl Sync for ResourcePage
impl Unpin for ResourcePage
impl UnsafeUnpin for ResourcePage
impl UnwindSafe for ResourcePage
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.