Struct sim::simulator::coupling::Message[][src]

pub struct Message { /* fields omitted */ }

Messages are the mechanism of information exchange for models in a a simulation. The message must contain origin information (source model ID and source model port), destination information (target model ID and target model port), and the text/content of the message.

Implementations

impl Message[src]

pub fn new(
    source_id: String,
    source_port: String,
    target_id: String,
    target_port: String,
    time: f64,
    content: String
) -> Self
[src]

This constructor method builds a Message, which is passed between simulation models

pub fn source_id(&self) -> &str[src]

This accessor method returns the model ID of a message source.

pub fn source_port(&self) -> &str[src]

This accessor method returns the source port of a message.

pub fn target_id(&self) -> &str[src]

This accessor method returns the model ID of a message target.

pub fn target_port(&self) -> &str[src]

This accessor method returns the target port of a message.

pub fn time(&self) -> &f64[src]

This accessor method returns the transmission time of a message.

pub fn content(&self) -> &str[src]

This accessor method returns the content of a message.

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl<'de> Deserialize<'de> for Message[src]

impl FromWasmAbi for Message[src]

type Abi = u32

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for Message[src]

type Abi = u32

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl OptionFromWasmAbi for Message[src]

impl OptionIntoWasmAbi for Message[src]

impl RefFromWasmAbi for Message[src]

type Abi = u32

The wasm ABI type references to Self are recovered from.

type Anchor = Ref<'static, Message>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous. Read more

impl RefMutFromWasmAbi for Message[src]

type Abi = u32

Same as RefFromWasmAbi::Abi

type Anchor = RefMut<'static, Message>

Same as RefFromWasmAbi::Anchor

impl Serialize for Message[src]

impl WasmDescribe for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

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<V, T> VZip<V> for T where
    V: MultiLane<T>,