pub struct ServiceContext<A: Application> { /* private fields */ }Implementations§
Source§impl<A: Application> ServiceContext<A>
impl<A: Application> ServiceContext<A>
pub fn ready(&self)
pub fn host(&self) -> OperationManager<A::Lanes>
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> Clone for ServiceContext<A>
impl<A: Application> Clone for ServiceContext<A>
Source§impl<A: Application> Host for ServiceContext<A>
impl<A: Application> Host for ServiceContext<A>
type Error = Error
type Instance<O: OperationDeclaration> = Running<O>
fn publish_on<S: StreamSpec>( &self, row: &S::Row, ) -> impl Future<Output = Result<(), Self::Error>> + Send
fn context(&self) -> &CallContext
fn with_value<T: ContextValue>(&self, value: T) -> Result<Self, ContextError>
fn submit<O: OperationDeclaration>( &self, request: O::Request, ) -> impl Future<Output = Result<Running<O>>> + Send
fn submit_owned<O: OperationDeclaration>( &self, request: O::Request, claims: RequestClaims, ) -> impl Future<Output = Result<Running<O>>> + Send
fn call<O: OperationDeclaration>( &self, request: O::Request, ) -> impl Future<Output = Result<Response<O::Response>>> + Send
fn call_owned<O>(
&self,
request: <O as OperationDeclaration>::Request,
claims: RequestClaims,
) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Sendwhere
O: OperationDeclaration,
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 ServiceContext<A>
impl<A> !UnwindSafe for ServiceContext<A>
impl<A> Freeze for ServiceContext<A>where
StateManager<A>: Freeze,
RecordManager<A>: Freeze,
StreamManager<A>: Freeze,
Evidence<A>: Freeze,
impl<A> Send for ServiceContext<A>
impl<A> Sync for ServiceContext<A>
impl<A> Unpin for ServiceContext<A>
impl<A> UnsafeUnpin for ServiceContext<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