pub enum RelatedReadScope {
Policy {
allow: &'static [ReadPolicy],
deny: &'static [ReadPolicy],
soft_delete_column: Option<&'static str>,
},
Unscoped,
}Variants§
Policy
Apply the related model’s list-slot read policy (@@allow/@@deny
on read/list) and its @@soft_delete filter inside the
subquery — exactly what find_many on that model applies, which
is also what ?include= goes through. A related row the caller
cannot read then behaves as if it did not exist: a to-one filter
(including ne and isNull) does not match it, none/every
over hidden-only children are vacuously true, and a relation sort
key reads as NULL.
An empty allow slice renders FALSE (default deny), the same as
a direct read of a model with no read rule.
Unscoped
Escape hatch: read the related table raw — no policy, no soft-delete filter. For trusted server code that deliberately wants every related row regardless of the caller. The embedded (rusqlite) backend ignores the scope either way. Generated client code (which never renders SQL) also uses it. Never use it for a filter or sort whose values a caller controls.
Trait Implementations§
Source§impl Clone for RelatedReadScope
impl Clone for RelatedReadScope
Source§fn clone(&self) -> RelatedReadScope
fn clone(&self) -> RelatedReadScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RelatedReadScope
Source§impl Debug for RelatedReadScope
impl Debug for RelatedReadScope
impl Eq for RelatedReadScope
Source§impl PartialEq for RelatedReadScope
impl PartialEq for RelatedReadScope
impl StructuralPartialEq for RelatedReadScope
Auto Trait Implementations§
impl Freeze for RelatedReadScope
impl RefUnwindSafe for RelatedReadScope
impl Send for RelatedReadScope
impl Sync for RelatedReadScope
impl Unpin for RelatedReadScope
impl UnsafeUnpin for RelatedReadScope
impl UnwindSafe for RelatedReadScope
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
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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