Struct SurfacePublication
pub struct SurfacePublication { /* private fields */ }Expand description
What the broker holds of one connection’s surface, as the publisher last sent it.
Implementations§
§impl SurfacePublication
impl SurfacePublication
pub fn next(
prior: Option<(&SurfacePublication, &[ActionDescriptor])>,
descriptors: &[ActionDescriptor],
) -> (SurfaceDelta, SurfacePublication)
pub fn next( prior: Option<(&SurfacePublication, &[ActionDescriptor])>, descriptors: &[ActionDescriptor], ) -> (SurfaceDelta, SurfacePublication)
The delta from prior (what the broker holds, with the descriptors it
was built from) to descriptors, and the state once it is applied.
Without a prior the delta is a reset: the broker discards whatever
it holds. Nothing is remembered until the caller keeps the returned
state, so a delta that was not sent changes nothing.
pub fn indices(&self, resource: &str) -> Option<&[usize]>
pub fn indices(&self, resource: &str) -> Option<&[usize]>
Where the actions of the published resource resource sit in the descriptors this
state was built from.
pub fn relabel(
&mut self,
descriptors: &[ActionDescriptor],
changed: &[&str],
) -> Option<SurfaceDelta>
pub fn relabel( &mut self, descriptors: &[ActionDescriptor], changed: &[&str], ) -> Option<SurfaceDelta>
The delta for resources whose own fields (a label) changed in descriptors, which are
the descriptors this state was built from with only those fields patched; the state is
then that delta applied. Costs what the changed resources hold, whatever the surface.
None, changing nothing, when one of them is not published.
Trait Implementations§
§impl Default for SurfacePublication
impl Default for SurfacePublication
§fn default() -> SurfacePublication
fn default() -> SurfacePublication
Auto Trait Implementations§
impl Freeze for SurfacePublication
impl RefUnwindSafe for SurfacePublication
impl Send for SurfacePublication
impl Sync for SurfacePublication
impl Unpin for SurfacePublication
impl UnsafeUnpin for SurfacePublication
impl UnwindSafe for SurfacePublication
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>
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