[][src]Struct sp_yew::MsgMeta

pub struct MsgMeta {
    pub tx: String,
    pub rx: String,
    pub key: String,
    pub kind: MsgKind,
    pub correlation_id: Uuid,
    pub route: Route,
    pub payload_size: u64,
    pub auth_token: Option<String>,
    pub auth_data: Option<Value>,
    pub attachments: Vec<Attachment>,
}

Message meta data. Message passing protocol is build around this structure.

Fields

tx: String

Addr of message sender

rx: String

Addr of message receiver

key: String

Logic key for message processing

kind: MsgKind

Defines what kind of message it is

correlation_id: Uuid

Correlation id is needed for rpc and for message chains

route: Route

Logical message route, receiver are responsible for moving message on.

payload_size: u64

Size of payload, used for deserialization. Also useful for monitoring.

auth_token: Option<String>

Authorization token.

auth_data: Option<Value>

Authorization data.

attachments: Vec<Attachment>

Attachments to message

Implementations

impl MsgMeta[src]

pub fn content_len(&self) -> u64[src]

Payload plus attachments len.

pub fn attachments_len(&self) -> u64[src]

Attachments len.

pub fn attachments_sizes(&self) -> Vec<u64>[src]

Attachments sizes.

pub fn display(&self) -> String[src]

Short display of message meta data

pub fn key_part(&self, index: usize) -> Result<&str, String>[src]

Get key part, index is zero based, . is used as a separator.

pub fn match_key_part(&self, index: usize, value: &str) -> Result<bool, String>[src]

Compares key part with passed value, index is zero based, . is used as a separator.

pub fn tx_part(&self, index: usize) -> Result<&str, String>[src]

Get tx part, index is zero based, . is used as a separator.

pub fn match_tx_part(&self, index: usize, value: &str) -> Result<bool, String>[src]

Compares tx part with passed value, index is zero based, . is used as a separator.

pub fn source_cmp_addr(&self) -> Option<&str>[src]

pub fn source_cmp_part(&self, index: usize) -> Result<&str, String>[src]

Get source cmp part, index is zero based, . is used as a separator.

pub fn match_source_cmp_part(
    &self,
    index: usize,
    value: &str
) -> Result<bool, String>
[src]

Compares source cmp part with passed value, index is zero based, . is used as a separator.

pub fn source_cmp_part_before_last(&self) -> Result<&str, String>[src]

Get source cmp part before last one, . is used as a separator.

pub fn source_svc_addr(&self) -> Option<String>[src]

pub fn client_cmp_addr(&self) -> Option<String>[src]

pub fn client_svc_addr(&self) -> Option<String>[src]

Trait Implementations

impl Clone for MsgMeta[src]

impl Debug for MsgMeta[src]

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

impl Serialize for MsgMeta[src]

Auto Trait Implementations

impl RefUnwindSafe for MsgMeta

impl Send for MsgMeta

impl Sync for MsgMeta

impl Unpin for MsgMeta

impl UnwindSafe for MsgMeta

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CloneAny for T where
    T: Clone + Any

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> 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>,