pub struct Channel(/* private fields */);Expand description
Identifies an invalidation domain (layout, paint, accessibility, etc.).
A channel is a lightweight handle (a single u8) that represents a specific
invalidation domain. Dependencies and invalidation state are tracked per-channel,
allowing independent invalidation of different concerns.
§Example
use invalidation::Channel;
// Define your own channels as constants
const LAYOUT: Channel = Channel::new(0);
const PAINT: Channel = Channel::new(1);
const A11Y: Channel = Channel::new(2);
const STYLE: Channel = Channel::new(3);§See Also
ChannelSet: A compact set of channels.InvalidationSet: Tracks invalidated keys per channel.InvalidationGraph: Stores dependencies per channel.InvalidationTracker: Coordinator for graph, set, cascade, and cross-channel workflows.
Implementations§
Source§impl Channel
impl Channel
Sourcepub const fn new(index: u8) -> Self
pub const fn new(index: u8) -> Self
Creates a new channel with the given index.
§Panics
Panics if index >= 64, as ChannelSet only supports 64 channels.
Sourcepub const fn into_set(self) -> ChannelSet
pub const fn into_set(self) -> ChannelSet
Converts this channel into a single-element ChannelSet.
Trait Implementations§
Source§impl From<Channel> for ChannelSet
impl From<Channel> for ChannelSet
impl Copy for Channel
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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