[][src]Struct kompact::KompactSystem

pub struct KompactSystem { /* fields omitted */ }

Methods

impl KompactSystem[src]

pub fn new(conf: KompactConfig) -> Result<Self, KompactError>[src]

pub fn schedule(&self, c: Arc<dyn CoreContainer>)[src]

pub fn logger(&self) -> &KompactLogger[src]

pub fn poison(&self)[src]

pub fn create<C, F>(&self, f: F) -> Arc<Component<C>> where
    F: FnOnce() -> C,
    C: ComponentDefinition + 'static, 
[src]

Create a new component.

New components are not started automatically.

pub fn create_unsupervised<C, F>(&self, f: F) -> Arc<Component<C>> where
    F: FnOnce() -> C,
    C: ComponentDefinition + 'static, 
[src]

Use this to create system components!

During system initialisation the supervisor is not available, yet, so normal create calls will panic!

pub fn create_and_register<C, F>(
    &self,
    f: F
) -> (Arc<Component<C>>, Future<Result<(), RegistrationError>>) where
    F: FnOnce() -> C,
    C: ComponentDefinition + 'static, 
[src]

pub fn create_and_start<C, F>(&self, f: F) -> Arc<Component<C>> where
    F: FnOnce() -> C,
    C: ComponentDefinition + 'static, 
[src]

Instantiates the component, registers it with the system dispatcher, and starts its lifecycle.

pub fn register_by_alias<C, A>(
    &self,
    c: &Arc<Component<C>>,
    alias: A
) -> Future<Result<(), RegistrationError>> where
    C: ComponentDefinition + 'static,
    A: Into<String>, 
[src]

Attempts to register the provided component with a human-readable alias.

Returns

A Future which resolves to an error if the alias is not unique, and a unit () if successful.

pub fn start<C>(&self, c: &Arc<Component<C>>) where
    C: ComponentDefinition + 'static, 
[src]

pub fn start_notify<C>(&self, c: &Arc<Component<C>>) -> Future<()> where
    C: ComponentDefinition + 'static, 
[src]

pub fn stop<C>(&self, c: &Arc<Component<C>>) where
    C: ComponentDefinition + 'static, 
[src]

pub fn stop_notify<C>(&self, c: &Arc<Component<C>>) -> Future<()> where
    C: ComponentDefinition + 'static, 
[src]

pub fn kill<C>(&self, c: Arc<Component<C>>) where
    C: ComponentDefinition + 'static, 
[src]

pub fn kill_notify<C>(&self, c: Arc<Component<C>>) -> Future<()> where
    C: ComponentDefinition + 'static, 
[src]

pub fn trigger_i<P: Port + 'static>(
    &self,
    msg: P::Indication,
    port: RequiredRef<P>
)
[src]

pub fn trigger_r<P: Port + 'static>(
    &self,
    msg: P::Request,
    port: ProvidedRef<P>
)
[src]

pub fn throughput(&self) -> usize[src]

pub fn max_messages(&self) -> usize[src]

pub fn await_termination(self)[src]

pub fn shutdown(self) -> Result<(), String>[src]

pub fn system_path(&self) -> SystemPath[src]

Trait Implementations

impl ActorRefFactory for KompactSystem[src]

impl Dispatching for KompactSystem[src]

impl ActorSource for KompactSystem[src]

impl TimerRefFactory for KompactSystem[src]

impl Clone for KompactSystem[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T