pub struct ParticipantBindingPolicy { /* private fields */ }Expand description
What a logical participant needs from whatever plays it.
Deliberately a policy and not a selection: the design says what would do, and the host says what there is. Naming a concrete agent here would make the design a deployment.
Implementations§
Source§impl ParticipantBindingPolicy
impl ParticipantBindingPolicy
pub fn new( host_kind: Option<HostKind>, capabilities: impl IntoIterator<Item = Capability>, independence_group: Option<IndependenceGroup>, ) -> Self
pub const fn host_kind(&self) -> Option<&HostKind>
pub const fn capabilities(&self) -> &BTreeSet<Capability>
pub const fn independence_group(&self) -> Option<&IndependenceGroup>
Sourcepub fn supplies(&self, capability: &Capability) -> bool
pub fn supplies(&self, capability: &Capability) -> bool
Whether whoever plays this participant would supply that.
Trait Implementations§
Source§impl Clone for ParticipantBindingPolicy
impl Clone for ParticipantBindingPolicy
Source§impl Debug for ParticipantBindingPolicy
impl Debug for ParticipantBindingPolicy
Source§impl Default for ParticipantBindingPolicy
impl Default for ParticipantBindingPolicy
Source§impl<'de> Deserialize<'de> for ParticipantBindingPolicy
impl<'de> Deserialize<'de> for ParticipantBindingPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ParticipantBindingPolicy
Source§impl PartialEq for ParticipantBindingPolicy
impl PartialEq for ParticipantBindingPolicy
Source§impl Serialize for ParticipantBindingPolicy
impl Serialize for ParticipantBindingPolicy
impl StructuralPartialEq for ParticipantBindingPolicy
Auto Trait Implementations§
impl Freeze for ParticipantBindingPolicy
impl RefUnwindSafe for ParticipantBindingPolicy
impl Send for ParticipantBindingPolicy
impl Sync for ParticipantBindingPolicy
impl Unpin for ParticipantBindingPolicy
impl UnsafeUnpin for ParticipantBindingPolicy
impl UnwindSafe for ParticipantBindingPolicy
Blanket Implementations§
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
Mutably borrows from an owned value. Read more