pub struct Scope<M: Model> { /* private fields */ }Expand description
The columns that tell trees in one table apart, such as the menu_id of a menu item.
Every query and write of the package stays inside the scope of the node it starts from, and a
new child gets its parent’s scope values. Build it in
NestedSet::scope:
impl NestedSet for MenuItem {
fn scope(&self) -> Scope<Self> {
Scope::new().by(MenuItem::menu_id, &self.menu_id)
}
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Scope<M>
impl<M> !UnwindSafe for Scope<M>
impl<M> Forget for Scope<M>
impl<M> Freeze for Scope<M>where
*const u8 is !null: Freeze,
PhantomData<Condition>: Freeze,
PhantomData<Box<dyn Fn(CreateBuilder<M>) -> CreateBuilder<M> + Sync + Send>>: Freeze,
PhantomData<&'static str>: Freeze,
PhantomData<u8>: Freeze,
impl<M> Move for Scope<M>
impl<M> Send for Scope<M>where
RawVecInner: Send,
BoxRaw<Condition>: Send,
&'static str: Send,
String: Send,
&'static [u8]: Send,
Vec<u8>: Send,
&'static Decimal: Send,
Decimal: Send,
RawTable<usize>: Send,
BoxRaw<RawValue>: Send,
Arc<Error>: Send,
&'static [f32]: Send,
Vec<f32>: Send,
BoxRaw<Expr>: Send,
Arc<Select>: Send,
BoxRaw<Search>: Send,
Arc<[f32]>: Send,
BoxRaw<str>: Send,
Arc<str>: Send,
Arc<String>: Send,
Arc<dyn Any + Sync + Send>: Send,
BoxRaw<dyn Fn(CreateBuilder<M>) -> CreateBuilder<M> + Sync + Send>: Send,
impl<M> Sync for Scope<M>where
RawVecInner: Sync,
BoxRaw<Condition>: Sync,
String: Sync,
Vec<u8>: Sync,
Decimal: Sync,
RawTable<usize>: Sync,
BoxRaw<RawValue>: Sync,
Arc<Error>: Sync,
Vec<f32>: Sync,
BoxRaw<Expr>: Sync,
Arc<Select>: Sync,
BoxRaw<Search>: Sync,
Arc<[f32]>: Sync,
BoxRaw<str>: Sync,
Arc<str>: Sync,
Arc<String>: Sync,
Arc<dyn Any + Sync + Send>: Sync,
BoxRaw<dyn Fn(CreateBuilder<M>) -> CreateBuilder<M> + Sync + Send>: Sync,
impl<M> Unpin for Scope<M>where
*const u8 is !null: Unpin,
Box<Condition>: Unpin,
&'static str: Unpin,
String: Unpin,
&'static [u8]: Unpin,
Vec<u8>: Unpin,
&'static Decimal: Unpin,
Decimal: Unpin,
Box<RawValue>: Unpin,
Arc<Error>: Unpin,
&'static [f32]: Unpin,
Vec<f32>: Unpin,
Box<Expr>: Unpin,
Arc<Select>: Unpin,
Box<Search>: Unpin,
Arc<[f32]>: Unpin,
Box<str>: Unpin,
Arc<str>: Unpin,
Arc<String>: Unpin,
Arc<dyn Any + Sync + Send>: Unpin,
Box<dyn Fn(CreateBuilder<M>) -> CreateBuilder<M> + Sync + Send>: Unpin,
impl<M> UnsafeUnpin for Scope<M>where
*const u8 is !null: UnsafeUnpin,
PhantomData<Condition>: UnsafeUnpin,
PhantomData<Box<dyn Fn(CreateBuilder<M>) -> CreateBuilder<M> + Sync + Send>>: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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