pub struct ModelDescriptor<M, PK> {Show 19 fields
pub schema_name: &'static str,
pub table_name: &'static str,
pub columns: &'static [ModelColumn],
pub primary_key: &'static str,
pub allowed_fields: &'static [&'static str],
pub allowed_includes: &'static [&'static str],
pub allowed_sorts: &'static [&'static str],
pub read_allow_policies: &'static [ReadPolicy],
pub read_deny_policies: &'static [ReadPolicy],
pub detail_allow_policies: &'static [ReadPolicy],
pub detail_deny_policies: &'static [ReadPolicy],
pub create_allow_policies: &'static [ReadPolicy],
pub create_deny_policies: &'static [ReadPolicy],
pub update_allow_policies: &'static [ReadPolicy],
pub update_deny_policies: &'static [ReadPolicy],
pub delete_allow_policies: &'static [ReadPolicy],
pub delete_deny_policies: &'static [ReadPolicy],
pub create_defaults: &'static [CreateDefault],
pub emitted_events: &'static [ModelEventKind],
/* private fields */
}Fields§
§schema_name: &'static str§table_name: &'static str§columns: &'static [ModelColumn]§primary_key: &'static str§allowed_fields: &'static [&'static str]§allowed_includes: &'static [&'static str]§allowed_sorts: &'static [&'static str]§read_allow_policies: &'static [ReadPolicy]§read_deny_policies: &'static [ReadPolicy]§detail_allow_policies: &'static [ReadPolicy]§detail_deny_policies: &'static [ReadPolicy]§create_allow_policies: &'static [ReadPolicy]§create_deny_policies: &'static [ReadPolicy]§update_allow_policies: &'static [ReadPolicy]§update_deny_policies: &'static [ReadPolicy]§delete_allow_policies: &'static [ReadPolicy]§delete_deny_policies: &'static [ReadPolicy]§create_defaults: &'static [CreateDefault]§emitted_events: &'static [ModelEventKind]Implementations§
Source§impl<M, PK> ModelDescriptor<M, PK>
impl<M, PK> ModelDescriptor<M, PK>
pub const fn new( schema_name: &'static str, table_name: &'static str, columns: &'static [ModelColumn], primary_key: &'static str, allowed_fields: &'static [&'static str], allowed_includes: &'static [&'static str], allowed_sorts: &'static [&'static str], read_allow_policies: &'static [ReadPolicy], read_deny_policies: &'static [ReadPolicy], detail_allow_policies: &'static [ReadPolicy], detail_deny_policies: &'static [ReadPolicy], create_allow_policies: &'static [ReadPolicy], create_deny_policies: &'static [ReadPolicy], update_allow_policies: &'static [ReadPolicy], update_deny_policies: &'static [ReadPolicy], delete_allow_policies: &'static [ReadPolicy], delete_deny_policies: &'static [ReadPolicy], create_defaults: &'static [CreateDefault], emitted_events: &'static [ModelEventKind], ) -> Self
pub fn emits(&self, operation: ModelEventKind) -> bool
pub fn select_projection(&self) -> String
Trait Implementations§
Source§impl<M: Clone, PK: Clone> Clone for ModelDescriptor<M, PK>
impl<M: Clone, PK: Clone> Clone for ModelDescriptor<M, PK>
Source§fn clone(&self) -> ModelDescriptor<M, PK>
fn clone(&self) -> ModelDescriptor<M, PK>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<M: Copy, PK: Copy> Copy for ModelDescriptor<M, PK>
Auto Trait Implementations§
impl<M, PK> Freeze for ModelDescriptor<M, PK>
impl<M, PK> RefUnwindSafe for ModelDescriptor<M, PK>
impl<M, PK> Send for ModelDescriptor<M, PK>
impl<M, PK> Sync for ModelDescriptor<M, PK>
impl<M, PK> Unpin for ModelDescriptor<M, PK>
impl<M, PK> UnsafeUnpin for ModelDescriptor<M, PK>
impl<M, PK> UnwindSafe for ModelDescriptor<M, PK>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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