pub struct ChannelKey { /* private fields */ }Expand description
Canonical key describing a channel’s schema and attachments.
Implementations§
Source§impl ChannelKey
impl ChannelKey
Sourcepub fn new(
schema: SchemaId,
backpressure: Backpressure,
producers: impl Iterator<Item = EndpointId>,
consumers: impl Iterator<Item = EndpointId>,
) -> Self
pub fn new( schema: SchemaId, backpressure: Backpressure, producers: impl Iterator<Item = EndpointId>, consumers: impl Iterator<Item = EndpointId>, ) -> Self
Create a new channel key from producers and consumers.
Sourcepub fn contains(
&self,
schema: SchemaId,
backpressure: Backpressure,
producer: EndpointId,
consumer: EndpointId,
) -> bool
pub fn contains( &self, schema: SchemaId, backpressure: Backpressure, producer: EndpointId, consumer: EndpointId, ) -> bool
Check whether this key matches the supplied endpoints and schema.
Sourcepub fn is_compatible(&self, desired: &ChannelKey) -> bool
pub fn is_compatible(&self, desired: &ChannelKey) -> bool
Check whether the key is compatible with another key.
Sourcepub fn backpressure(&self) -> Backpressure
pub fn backpressure(&self) -> Backpressure
Return the backpressure behaviour for this channel.
Sourcepub fn producers(&self) -> &[EndpointId] ⓘ
pub fn producers(&self) -> &[EndpointId] ⓘ
Return producers on this channel.
Sourcepub fn consumers(&self) -> &[EndpointId] ⓘ
pub fn consumers(&self) -> &[EndpointId] ⓘ
Return consumers on this channel.
Trait Implementations§
Source§impl Clone for ChannelKey
impl Clone for ChannelKey
Source§fn clone(&self) -> ChannelKey
fn clone(&self) -> ChannelKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelKey
impl Debug for ChannelKey
Source§impl Hash for ChannelKey
impl Hash for ChannelKey
Source§impl Ord for ChannelKey
impl Ord for ChannelKey
Source§fn cmp(&self, other: &ChannelKey) -> Ordering
fn cmp(&self, other: &ChannelKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ChannelKey
impl PartialEq for ChannelKey
Source§impl PartialOrd for ChannelKey
impl PartialOrd for ChannelKey
impl Eq for ChannelKey
impl StructuralPartialEq for ChannelKey
Auto Trait Implementations§
impl Freeze for ChannelKey
impl RefUnwindSafe for ChannelKey
impl Send for ChannelKey
impl Sync for ChannelKey
impl Unpin for ChannelKey
impl UnsafeUnpin for ChannelKey
impl UnwindSafe for ChannelKey
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