[][src]Struct aeron_rs::concurrent::agent_invoker::AgentInvoker

pub struct AgentInvoker<T: Agent> { /* fields omitted */ }

Methods

impl<T: Agent> AgentInvoker<T>[src]

pub fn new(agent: Arc<Mutex<T>>, exception_handler: ErrorHandler) -> Self[src]

pub fn is_started(&self) -> bool[src]

Has the Agent been started?

@return has the Agent been started?

pub fn is_running(&self) -> bool[src]

Is the Agent running?

@return is the Agent been started successfully and not closed?

pub fn is_closed(&self) -> bool[src]

Has the Agent been closed?

@return has the Agent been closed?

pub fn start(&mut self)[src]

Mark the invoker as started and call the Agent::onStart() method.

Startup logic will only be performed once.

pub fn invoke(&self) -> i32[src]

Invoke the Agent::doWork() method and return the work count.

If not successfully started or after closed then this method will return without invoking the {@link Agent}.

@return the work count for the Agent::doWork() method.

pub fn close(&mut self)[src]

Mark the invoker as closed and call the Agent::onClose() logic for clean up.

The clean up logic will only be performed once.

Auto Trait Implementations

impl<T> RefUnwindSafe for AgentInvoker<T>

impl<T> Send for AgentInvoker<T> where
    T: Send

impl<T> Sync for AgentInvoker<T> where
    T: Send

impl<T> Unpin for AgentInvoker<T>

impl<T> UnwindSafe for AgentInvoker<T>

Blanket Implementations

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

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

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

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

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

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.