pub struct ServiceHandle<R, P>{ /* private fields */ }Implementations§
Source§impl<R, P> ServiceHandle<R, P>
impl<R, P> ServiceHandle<R, P>
pub fn hooks<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut ServiceHooks<R, P>),
pub fn inner(&self) -> &Arc<dyn DogService<R, P>>
Source§impl<R, P> ServiceHandle<R, P>
impl<R, P> ServiceHandle<R, P>
Sourcepub fn on(&self, event: ServiceEventKind, listener: EventListener<R, P>)
pub fn on(&self, event: ServiceEventKind, listener: EventListener<R, P>)
app.service(“messages”)?.on(ServiceEventKind::Created, Arc::new(|data, ctx| { /* … */ }));
pub fn on_str(&self, event: &str, listener: EventListener<R, P>) -> Result<()>
Source§impl<R, P> ServiceHandle<R, P>
impl<R, P> ServiceHandle<R, P>
pub async fn find(&self, tenant: TenantContext, params: P) -> Result<Vec<R>>
pub async fn get(&self, tenant: TenantContext, id: &str, params: P) -> Result<R>
pub async fn create( &self, tenant: TenantContext, data: R, params: P, ) -> Result<R>
pub async fn patch( &self, tenant: TenantContext, id: Option<&str>, data: R, params: P, ) -> Result<R>
pub async fn update( &self, tenant: TenantContext, id: &str, data: R, params: P, ) -> Result<R>
pub async fn remove( &self, tenant: TenantContext, id: Option<&str>, params: P, ) -> Result<R>
Auto Trait Implementations§
impl<R, P> Freeze for ServiceHandle<R, P>
impl<R, P> !RefUnwindSafe for ServiceHandle<R, P>
impl<R, P> Send for ServiceHandle<R, P>
impl<R, P> Sync for ServiceHandle<R, P>
impl<R, P> Unpin for ServiceHandle<R, P>
impl<R, P> !UnwindSafe for ServiceHandle<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