pub struct SchemaBuilder<'a, R, P>{ /* private fields */ }Expand description
Fluent builder used by ServiceHooks::schema(...).
Implementations§
Source§impl<'a, R, P> SchemaBuilder<'a, R, P>
impl<'a, R, P> SchemaBuilder<'a, R, P>
pub fn on_create(&mut self) -> &mut Self
pub fn on_patch(&mut self) -> &mut Self
pub fn on_update(&mut self) -> &mut Self
pub fn on_writes(&mut self) -> &mut Self
pub fn resolve( &mut self, f: impl Fn(&mut R, &HookMeta<R, P>) -> Result<()> + Send + Sync + 'static, ) -> &mut Self
pub fn validate( &mut self, f: impl Fn(&R, &HookMeta<R, P>) -> Result<()> + Send + Sync + 'static, ) -> &mut Self
Auto Trait Implementations§
impl<'a, R, P> Freeze for SchemaBuilder<'a, R, P>
impl<'a, R, P> !RefUnwindSafe for SchemaBuilder<'a, R, P>
impl<'a, R, P> Send for SchemaBuilder<'a, R, P>
impl<'a, R, P> Sync for SchemaBuilder<'a, R, P>
impl<'a, R, P> Unpin for SchemaBuilder<'a, R, P>
impl<'a, R, P> !UnwindSafe for SchemaBuilder<'a, R, P>
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