struct Holds<'a> {
surface: &'a Arc<ViewSurface>,
seats: Vec<SessionSlot>,
}Expand description
The seats this connection is holding, each given back when this drops.
A plain vec would do, except that anything between the hold and the clean-up - a panic in the encode, which folds a transcript and scans a tree - takes the clean-up with it, and a seat’s count left standing is a loop the next viewer never gets. A guard runs on the way out of an unwind.
Fields§
§surface: &'a Arc<ViewSurface>§seats: Vec<SessionSlot>Implementations§
Source§impl<'a> Holds<'a>
impl<'a> Holds<'a>
fn new(surface: &'a Arc<ViewSurface>) -> Self
Sourcefn take(&mut self, slot: &SessionSlot)
fn take(&mut self, slot: &SessionSlot)
Remember a seat this connection is now holding.
Sourcefn give_back(&mut self, slot: &SessionSlot) -> bool
fn give_back(&mut self, slot: &SessionSlot) -> bool
Give back one hold, answering whether this connection had one.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Holds<'a>
impl<'a> !UnwindSafe for Holds<'a>
impl<'a> Freeze for Holds<'a>
impl<'a> Send for Holds<'a>
impl<'a> Sync for Holds<'a>
impl<'a> Unpin for Holds<'a>
impl<'a> UnsafeUnpin for Holds<'a>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more