pub struct CrudGroup {
pub base_name: String,
pub create: Option<Endpoint>,
pub read: Option<Endpoint>,
pub update: Option<Endpoint>,
pub delete: Option<Endpoint>,
pub list: Option<Endpoint>,
}Expand description
A group of related CRUD endpoints sharing a common resource name.
Fields§
§base_name: StringThe normalised resource name that ties these endpoints together.
create: Option<Endpoint>The endpoint that creates this resource, if detected.
read: Option<Endpoint>The endpoint that reads / retrieves this resource, if detected.
update: Option<Endpoint>The endpoint that updates this resource, if detected.
delete: Option<Endpoint>The endpoint that deletes this resource, if detected.
list: Option<Endpoint>The endpoint that lists instances of this resource, if detected.
Implementations§
Source§impl CrudGroup
impl CrudGroup
Sourcepub fn endpoint_count(&self) -> usize
pub fn endpoint_count(&self) -> usize
Returns the number of CRUD slots that have been populated.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true if all five CRUD+List slots are populated.
Trait Implementations§
impl Eq for CrudGroup
impl StructuralPartialEq for CrudGroup
Auto Trait Implementations§
impl Freeze for CrudGroup
impl RefUnwindSafe for CrudGroup
impl Send for CrudGroup
impl Sync for CrudGroup
impl Unpin for CrudGroup
impl UnsafeUnpin for CrudGroup
impl UnwindSafe for CrudGroup
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.