[][src]Trait spartan_lib::core::payload::Identifiable

pub trait Identifiable {
    type Id: Copy + Eq;
    pub fn id(&self) -> Self::Id;
}

Interface for working with identifiable messages

Associated Types

type Id: Copy + Eq[src]

Loading content...

Required methods

pub fn id(&self) -> Self::Id[src]

Get message ID

use spartan_lib::core::message::builder::MessageBuilder;
use spartan_lib::core::payload::Identifiable;

let message = MessageBuilder::default().body("Hello, world").compose().unwrap();

println!("Message ID is: {}", message.id());
Loading content...

Implementors

impl Identifiable for Message[src]

type Id = Uuid

Loading content...