Skip to main content

Sum4

Struct Sum4 

Source
pub struct Sum4 {
    pub sum: u64,
    /* private fields */
}

Fields§

§sum: u64

Trait Implementations§

Source§

impl From<Sum4> for GlobalProcess

Source§

fn from(process: Sum4) -> Self

Converts to this type from the input type.
Source§

impl Process<SessionB, ()> for Sum4

Source§

fn new(inner: Inner<SessionB>) -> Self

Source§

fn extract_result( session_results: &mut VecMap<GlobalPresult>, ) -> Result<(), String>

Source§

fn inner_ref(&self) -> &Inner<SessionB>

Source§

fn inner_mut(&mut self) -> &mut Inner<SessionB>

Source§

fn result_ref(&self) -> &()

Source§

fn result_mut(&mut self) -> &mut ()

Source§

fn global_result(&mut self) -> GlobalPresult

Source§

fn handle_message(&mut self, message: GlobalMessage) -> ControlFlow

Source§

fn update(&mut self) -> ControlFlow

Source§

fn initialize(&mut self)

Does nothing by default, may be overridden.
Source§

fn terminate(&mut self)

Does nothing by default, may be overridden.
Source§

fn id(&self) -> &CTX::PID
where CTX: 'static,

Source§

fn kind(&self) -> &Kind
where CTX: 'static,

Source§

fn state_id(&self) -> StateId

Source§

fn def(&self) -> &Def<CTX>

Source§

fn sourcepoints(&self) -> &VecMap<Box<dyn Sourcepoint<CTX>>>

Source§

fn sourcepoints_mut(&mut self) -> &mut VecMap<Box<dyn Sourcepoint<CTX>>>

Source§

fn endpoints(&self) -> Ref<'_, Option<VecMap<Box<dyn Endpoint<CTX>>>>>

This method returns a Ref <Option <...>> because during the run loop the endpoints will be unavailable as they are being iterated over. Endpoints are automatically waited on or polled in the appropriate run_* function. Endpoints will be present for the calls to terminate or initialize, either before or after the run loop, respectively.
Source§

fn endpoints_mut( &mut self, ) -> RefMut<'_, Option<VecMap<Box<dyn Endpoint<CTX>>>>>

This method returns a Ref <Option <...>> because during the run loop the endpoints will be unavailable as they are being iterated over. Endpoints are automatically waited on or polled in the appropriate run_* function. Endpoints will be present for the calls to terminate or initialize, either before or after the run loop, respectively.
Source§

fn take_endpoints(&self) -> VecMap<Box<dyn Endpoint<CTX>>>

This method is used within the process run_* methods to get the endpoints without borrowing the process. Endpoints will then be replaced with None and unavailable within the run loop. Read more
Source§

fn put_endpoints(&self, endpoints: VecMap<Box<dyn Endpoint<CTX>>>)

Errors Read more
Source§

fn send<M: Message<CTX>>( &self, channel_id: CTX::CID, message: M, ) -> Result<(), SendError<CTX::GMSG>>
where CTX: 'static,

Source§

fn send_to<M: Message<CTX>>( &self, channel_id: CTX::CID, recipient: CTX::PID, message: M, ) -> Result<(), SendError<CTX::GMSG>>
where CTX: 'static,

Source§

fn run(&mut self)
where Self: Sized + 'static, CTX: 'static,

Run a process to completion and send the result on the result channel.
Source§

fn run_continue(self) -> Option<()>
where Self: Sized + 'static, CTX: 'static,

Run a process to completion, send the result to the session, and proceed with the continuation received from the session.
Source§

fn run_asynchronous(&mut self)
where Self: Sized, CTX: 'static,

Asynchronous run loop waits for messages on the single endpoint held by this process and calls the process update method for every $n >= 1$ messages as specified by the process kind.
Source§

fn run_isochronous(&mut self)
where Self: Sized, CTX: 'static,

This function implements a fixed-timestep update loop. Read more
Source§

fn run_mesochronous(&mut self)
where Self: Sized, CTX: 'static,

This function implements a rate-limited update loop. Read more
Source§

fn run_anisochronous(&mut self)
where Self: Sized, CTX: 'static,

An un-timed run loop that polls for messages.
Source§

impl TryFrom<GlobalProcess> for Sum4

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(global_process: GlobalProcess) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Presult<SessionB, Sum4> for ()

Auto Trait Implementations§

§

impl !Freeze for Sum4

§

impl !RefUnwindSafe for Sum4

§

impl Send for Sum4

§

impl !Sync for Sum4

§

impl Unpin for Sum4

§

impl UnsafeUnpin for Sum4

§

impl !UnwindSafe for Sum4

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.