pub struct MemoryDomainSet(/* private fields */);Expand description
A set of MemoryDomains — everywhere a port’s frames may live.
A producer’s set is what it may emit and a consumer’s is what it can
take, so compatibility is the former being a subset of the latter,
exactly as for MediaKindSet. An element that genuinely does not
care — one that never reads the pixels — declares Self::ALL, which
is a claim rather than an omission: there is no “unstated” domain to
forget, because PortContract::Frames has nowhere to leave it out.
Implementations§
Source§impl MemoryDomainSet
impl MemoryDomainSet
Sourcepub const ALL: Self
pub const ALL: Self
Every backend — for an element that passes frames through without reading them.
Sourcepub const fn of(domain: MemoryDomain) -> Self
pub const fn of(domain: MemoryDomain) -> Self
A set holding exactly domain.
Sourcepub const fn from_slice(domains: &[MemoryDomain]) -> Self
pub const fn from_slice(domains: &[MemoryDomain]) -> Self
A set holding every domain in domains. Duplicates are harmless.
Sourcepub const fn contains(self, domain: MemoryDomain) -> bool
pub const fn contains(self, domain: MemoryDomain) -> bool
Returns whether domain is in this set.
Sourcepub const fn is_subset_of(self, other: Self) -> bool
pub const fn is_subset_of(self, other: Self) -> bool
Returns whether every domain in this set is also in other — the
producer-into-consumer direction the link check asks about.
Trait Implementations§
Source§impl Clone for MemoryDomainSet
impl Clone for MemoryDomainSet
Source§fn clone(&self) -> MemoryDomainSet
fn clone(&self) -> MemoryDomainSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more