pub struct OperationManager { /* private fields */ }Implementations§
Source§impl OperationManager
impl OperationManager
pub fn cache_capacity(&self) -> usize
pub fn set_cache_capacity(&self, capacity: usize)
pub fn clear_cache(&self)
pub fn invalidate<O: OperationDeclaration>(&self, key: &CacheKey) -> Result<()>
pub fn invalidate_from<O: OperationDeclaration>( &self, owner: &str, key: &CacheKey, ) -> Result<()>
Source§impl OperationManager
impl OperationManager
pub fn register_middleware(&self, middleware: Arc<dyn Middleware>) -> Result<()>
pub fn with_context(&self, context: CallContext) -> Self
pub fn status(&self, id: OperationInstanceId) -> Option<OperationStatus>
Source§impl OperationManager
impl OperationManager
pub fn definition(&self, id: &str) -> Result<Definition>
pub fn definition_from(&self, owner: &str, id: &str) -> Result<Definition>
pub fn submit_from<O: OperationDeclaration>( &self, owner: &str, request: O, ) -> Result<OperationInstance<O>>
pub fn definitions(&self) -> Vec<Definition>
pub fn owner(&self, id: &str) -> Result<Identifier>
Source§impl OperationManager
impl OperationManager
pub fn register_operation<T>( &self, owner: impl Into<String>, lane: impl Lane, resources: Arc<T::Resources>, ) -> Result<()>
pub fn register_operation_id<T>( &self, owner: impl Into<String>, id: impl Into<String>, lane: impl Lane, resources: Arc<T::Resources>, ) -> Result<()>
pub fn register_wire_operation<T>( &self, owner: impl Into<String>, lane: impl Lane, resources: Arc<T::Resources>, ) -> Result<()>
pub fn register_wire_contract<T>( &self, owner: impl Into<String>, contract: &Contract, lane: impl Lane, resources: Arc<T::Resources>, ) -> Result<()>
Source§impl OperationManager
impl OperationManager
pub fn submit<O: OperationDeclaration>( &self, request: O, ) -> Result<OperationInstance<O>>
pub fn submit_endpoints<O: OperationDeclaration, P: Send + 'static>( &self, request: O, endpoints: P, ) -> Result<OperationInstance<O>>
pub fn submit_charged<O: OperationDeclaration, P: Send + 'static>( &self, request: StreamItem<O>, endpoints: P, ) -> Result<OperationInstance<O>>
pub fn submit_at<O: OperationDeclaration>( &self, id: &str, request: O, ) -> Result<OperationInstance<O>>
pub async fn call<O: OperationDeclaration>( &self, request: O, ) -> Result<Response<O::Response>>
pub fn submit_caused<O: OperationDeclaration>( &self, request: O, cause: Position, ) -> Result<OperationInstance<O>>
pub async fn call_caused<O: OperationDeclaration>( &self, request: O, cause: Position, ) -> Result<Response<O::Response>>
Source§impl OperationManager
impl OperationManager
pub fn register_observer<B: ObserverBackend>(&self, backend: B) -> Result<()>
pub fn stage_observers<B: ObserverBackend>( &self, resources: &Arc<B::Resources>, backends: impl IntoIterator<Item = B>, ) -> Result<ObserverRegistration>
pub fn register_service<A, R, F, T>( &self, definition: ServiceDefinition, factory: F, ) -> Result<()>
pub async fn submit_with_resources_at<R: Send + Sync + 'static>( &self, id: &str, resources: Arc<R>, ) -> Result<OperationInstance<Activation>>
pub async fn submit_resident( &self, id: &str, ) -> Result<OperationInstance<Activation>>
pub fn resident_definition(&self, id: &str) -> Option<Definition>
pub fn resident_definitions(&self) -> Vec<Definition>
pub fn resident(&self, key: &Key) -> Option<Snapshot>
pub fn residents(&self) -> BTreeMap<Key, Snapshot>
pub fn watch_residents(&self) -> Receiver<BTreeMap<Key, Snapshot>>
pub fn resident_key(&self, instance: OperationInstanceId) -> Option<Key>
pub fn root_resources(&self) -> Arc<()> ⓘ
pub async fn retire_resources<R: Send + Sync + 'static>( &self, resources: &Arc<R>, ) -> Result<()>
pub async fn unregister_resident(&self, id: &str) -> Result<()>
pub async fn stop_observers(&self) -> Result<()>
pub async fn shutdown_residents(&self) -> Result<()>
Source§impl OperationManager
impl OperationManager
pub fn upload<O: OperationDeclaration>( &self, request: O, settings: StreamSettings, ) -> Result<Upload<O>>
pub fn download<O: OperationDeclaration>( &self, request: O, settings: StreamSettings, ) -> Result<Download<O>>
pub fn exchange<O: OperationDeclaration>( &self, request: O, input: StreamSettings, output: StreamSettings, ) -> Result<Exchange<O>>
Source§impl OperationManager
impl OperationManager
Source§impl OperationManager
impl OperationManager
pub fn submit_encoded( &self, operation: &str, payload: Vec<u8>, ) -> Result<EncodedInvocation>
pub async fn call_encoded( &self, operation: &str, payload: Vec<u8>, ) -> Result<Vec<u8>>
Trait Implementations§
Source§impl Clone for OperationManager
impl Clone for OperationManager
Source§impl Host for OperationManager
impl Host for OperationManager
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, _: 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 !RefUnwindSafe for OperationManager
impl !UnwindSafe for OperationManager
impl Freeze for OperationManager
impl Send for OperationManager
impl Sync for OperationManager
impl Unpin for OperationManager
impl UnsafeUnpin for OperationManager
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