pub struct Link { /* private fields */ }Expand description
A link between two machines under one network.
Implementations§
Source§impl Link
impl Link
Sourcepub fn new(
network_id: String,
id: String,
exporter: MachineIdentity,
importer: MachineIdentity,
) -> Result<Self, LinkError>
pub fn new( network_id: String, id: String, exporter: MachineIdentity, importer: MachineIdentity, ) -> Result<Self, LinkError>
Describes a link under network_id between two different machines.
§Errors
An identifier that is empty or carries whitespace, or one machine on both ends.
Sourcepub fn network_id(&self) -> &str
pub fn network_id(&self) -> &str
The network the link is placed under.
Sourcepub fn resource(&self) -> AccessResource
pub fn resource(&self) -> AccessResource
The link as a placed resource of kind link.
Sourcepub const fn exporter(&self) -> &MachineIdentity
pub const fn exporter(&self) -> &MachineIdentity
The machine messages leave.
Sourcepub const fn importer(&self) -> &MachineIdentity
pub const fn importer(&self) -> &MachineIdentity
The machine messages arrive at.
Sourcepub fn open<C: LysDeliberateConsumer>(
&self,
end: LinkAction,
consumer: &C,
pass: &AdmittedLysPass<C::Pass>,
now: u64,
) -> Result<DeliberateDecision, AccessDecisionError>
pub fn open<C: LysDeliberateConsumer>( &self, end: LinkAction, consumer: &C, pass: &AdmittedLysPass<C::Pass>, now: u64, ) -> Result<DeliberateDecision, AccessDecisionError>
Asks Lys, live, whether this end may open the link: the exporting
end asks for link_export on the link, the importing end for
link_import. Never decided from the pass alone; the seam’s absence is
the deliberate_unavailable refusal.
§Errors
The one refusal shape with its cause.
Sourcepub fn crossing(
&self,
exporter: &dyn LinkRights,
importer: &dyn LinkRights,
subject: &str,
now: u64,
) -> Result<Crossing, LinkRefusal>
pub fn crossing( &self, exporter: &dyn LinkRights, importer: &dyn LinkRights, subject: &str, now: u64, ) -> Result<Crossing, LinkRefusal>
Decides one message crossing on this link resource: the exporter’s pass first, then the importer’s, both offline; either refusal names its end.
§Errors
The subject could not be bound, or an end holds no reaching grant.
Trait Implementations§
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.