pub struct RouteSlot { /* private fields */ }Expand description
The hand-off point for one output’s route.
The reader task writes; the output handle reads and takes. A slot never holds more than one pending update — a downgrade that lands on top of an unclaimed upgrade replaces it, which is correct: the daemon’s latest word is the one that matters.
Implementations§
Source§impl RouteSlot
impl RouteSlot
Sourcepub fn offer_upgrade(
&self,
producer: Producer,
segment: ShmSegmentSpec,
consumers: Vec<PortRef>,
)
pub fn offer_upgrade( &self, producer: Producer, segment: ShmSegmentSpec, consumers: Vec<PortRef>, )
Publishes an upgrade for the owning handle to pick up.
Sourcepub fn offer_downgrade(&self, reason: RouteDowngradeReason)
pub fn offer_downgrade(&self, reason: RouteDowngradeReason)
Publishes a downgrade for the owning handle to pick up.
Sourcepub fn take(&self) -> RouteUpdate
pub fn take(&self) -> RouteUpdate
Takes whatever is pending, leaving the slot idle.
Sourcepub fn has_update(&self) -> bool
pub fn has_update(&self) -> bool
Whether an update is waiting.
Sourcepub fn plane(&self) -> RoutePlane
pub fn plane(&self) -> RoutePlane
The plane the owning handle reports it is publishing on.
Sourcepub fn set_plane(&self, plane: RoutePlane)
pub fn set_plane(&self, plane: RoutePlane)
Records the plane the owning handle switched to.
Sourcepub fn transitions(&self) -> (u64, u64)
pub fn transitions(&self) -> (u64, u64)
How many upgrades and downgrades this route has seen.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RouteSlot
impl RefUnwindSafe for RouteSlot
impl Send for RouteSlot
impl Sync for RouteSlot
impl Unpin for RouteSlot
impl UnsafeUnpin for RouteSlot
impl UnwindSafe for RouteSlot
Blanket Implementations§
impl<T> Allocation for T
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