pub struct LocalServices { /* private fields */ }Expand description
Refinements and experiments over keyed durable documents (one service instance per owner).
Implementations§
Source§impl LocalServices
impl LocalServices
pub fn new(documents: Box<dyn KeyedDocuments>, options: LocalOptions) -> Self
Sourcepub fn worker(documents: Box<dyn KeyedDocuments>) -> Self
pub fn worker(documents: Box<dyn KeyedDocuments>) -> Self
The session worker’s service (createWorkerServices): activation runs the worker’s content checks
(crate::validation::validate_refinement_content); approval stays off.
Sourcepub fn handle(
&self,
kind: &str,
payload: &Value,
branch: Option<&Branch>,
) -> Result<Value, String>
pub fn handle( &self, kind: &str, payload: &Value, branch: Option<&Branch>, ) -> Result<Value, String>
Serves one request; branch is the caller’s conversation branch (none: every event applies).
pub fn current( &self, kind: &str, target: &str, branch: Option<&Branch>, ) -> Result<Option<Value>, String>
Auto Trait Implementations§
impl !Freeze for LocalServices
impl !RefUnwindSafe for LocalServices
impl !UnwindSafe for LocalServices
impl Forget for LocalServices
impl Move for LocalServices
impl Send for LocalServices
impl Sync for LocalServices
impl Unpin for LocalServices
impl UnsafeUnpin for LocalServices
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