pub struct Service<A: Application> { /* private fields */ }Implementations§
Source§impl<A: Application> Service<A>
impl<A: Application> Service<A>
pub fn ready(&self)
pub fn host(&self) -> OperationManager
pub fn records(&self) -> &RecordManager<A>
pub fn state(&self) -> &StateManager<A>
pub fn streams(&self) -> &StreamManager<A>
pub fn evidence(&self) -> &Evidence<A>
pub fn is_stopping(&self) -> bool
pub async fn stopping(&mut self)
pub async fn rest(&mut self, duration: Duration) -> bool
pub async fn until_stopping<T>( &mut self, future: impl Future<Output = T>, ) -> Option<T>
Trait Implementations§
Source§impl<A: Application> Host for Service<A>
impl<A: Application> Host for Service<A>
type Error = Error
type Instance<O: OperationDeclaration> = OperationInstance<O>
fn context(&self) -> &CallContext
fn with_value<T: ContextValue>(&self, value: T) -> Result<Self, ContextError>
fn submit<O: OperationDeclaration>( &self, request: O, ) -> impl Future<Output = Result<OperationInstance<O>>> + Send
fn call<O: OperationDeclaration>( &self, request: O, ) -> impl Future<Output = Result<Response<O::Response>>> + Send
fn submit_with_resources<O: OperationDeclaration<Response = ()>, R: Send + Sync + 'static>( &self, request: O, resources: Arc<R>, ) -> impl Future<Output = Result<OperationInstance<O>>> + Send
fn publish_on<S>( &self, row: &<S as StreamSpec>::Row, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn publish<S>(
&self,
row: &S,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
S: StreamSpec<Row = S> + Message,
Auto Trait Implementations§
impl<A> !RefUnwindSafe for Service<A>
impl<A> !UnwindSafe for Service<A>
impl<A> Freeze for Service<A>where
StateManager<A>: Freeze,
RecordManager<A>: Freeze,
StreamManager<A>: Freeze,
Evidence<A>: Freeze,
impl<A> Send for Service<A>
impl<A> Sync for Service<A>
impl<A> Unpin for Service<A>
impl<A> UnsafeUnpin for Service<A>where
StateManager<A>: UnsafeUnpin,
RecordManager<A>: UnsafeUnpin,
StreamManager<A>: UnsafeUnpin,
Evidence<A>: 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