Struct ockam_core::Mailboxes
source · pub struct Mailboxes { /* private fields */ }
Expand description
A collection of Mailbox
es for a [Context
]
Implementations§
source§impl Mailboxes
impl Mailboxes
sourcepub fn new(main_mailbox: Mailbox, additional_mailboxes: Vec<Mailbox>) -> Self
pub fn new(main_mailbox: Mailbox, additional_mailboxes: Vec<Mailbox>) -> Self
Create a new collection of Mailboxes
from the given Mailbox
es
sourcepub fn main(
address: impl Into<Address>,
incoming_access_control: Arc<dyn IncomingAccessControl>,
outgoing_access_control: Arc<dyn OutgoingAccessControl>
) -> Self
pub fn main(
address: impl Into<Address>,
incoming_access_control: Arc<dyn IncomingAccessControl>,
outgoing_access_control: Arc<dyn OutgoingAccessControl>
) -> Self
Create a new collection of Mailboxes
for the given
Address
with IncomingAccessControl
and OutgoingAccessControl
sourcepub fn aliases(&self) -> Vec<Address> ⓘ
pub fn aliases(&self) -> Vec<Address> ⓘ
Return an [AddressSet
] containing all addresses represented by these Mailboxes
sourcepub fn main_address(&self) -> Address
pub fn main_address(&self) -> Address
Return the main Address
for these Mailboxes
sourcepub fn contains(&self, msg_addr: &Address) -> bool
pub fn contains(&self, msg_addr: &Address) -> bool
Return true
if the given Address
is represented by these Mailboxes
sourcepub fn find_mailbox(&self, msg_addr: &Address) -> Option<&Mailbox>
pub fn find_mailbox(&self, msg_addr: &Address) -> Option<&Mailbox>
Return true
if the given Address
is authorized to post
the given RelayMessage
to these Mailboxes
TODO docs are confusing
Return true
if these Mailboxes
are authorized to post the
given RelayMessage
to the given Address
TODO docs are confusing
sourcepub fn addresses(&self) -> Vec<Address> ⓘ
pub fn addresses(&self) -> Vec<Address> ⓘ
Return the [AddressSet
] represented by these Mailboxes
sourcepub fn main_mailbox(&self) -> &Mailbox
pub fn main_mailbox(&self) -> &Mailbox
Return a reference to the main Mailbox
for this collection
of Mailboxes