pub struct Hook {
pub filter: Option<Arc<dyn Filter>>,
pub attribute: Option<Arc<dyn Attribute>>,
pub join_filter: Option<Arc<dyn JoinFilter>>,
}Expand description
A hook a builder accepts: one object may filter, resolve attributes and
filter joins at once (as Tenant filters both tables and joins).
PHP: Utopia\Query\Hook, whose implementations a builder sorts by the
interfaces they implement.
Fields§
§filter: Option<Arc<dyn Filter>>The filter part.
attribute: Option<Arc<dyn Attribute>>The attribute part.
join_filter: Option<Arc<dyn JoinFilter>>The join filter part.
Implementations§
Source§impl Hook
impl Hook
Sourcepub fn attribute(attribute: impl Attribute + 'static) -> Self
pub fn attribute(attribute: impl Attribute + 'static) -> Self
A hook that only resolves attributes.
Sourcepub fn join_filter(join_filter: impl JoinFilter + 'static) -> Self
pub fn join_filter(join_filter: impl JoinFilter + 'static) -> Self
A hook that only filters joins.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Hook
impl !UnwindSafe for Hook
impl Forget for Hook
impl Freeze for Hook
impl Move for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnsafeUnpin for Hook
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