#[non_exhaustive]pub struct AnimationHint {
pub redefinition: AnimationChange,
pub replacement: AnimationChange,
}Expand description
Specifies how a Block might change in the very near future, for the benefit
of rendering algorithms. Does not currently describe non-visual aspects of a block.
This should be configured for blocks which either are continuously animated in some fashion, or for which it is especially important that the specified changes are handled efficiently, at the possible cost of spending more resources on those blocks. Blocks which merely might change in response to user action should not set this hint.
The | operator may be used to combine multiple hints into “both of these will happen”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.redefinition: AnimationChangeWays in which the block’s definition might change (via modification to a
BlockDef or recursive Space) such that many instances of this block
will become another simultaneously.
replacement: AnimationChangeIf this block is likely to be replaced in a Space by another, this field
specifies the replacement’s relation to this.
Implementations§
Source§impl AnimationHint
impl AnimationHint
Sourcepub const UNCHANGING: Self
pub const UNCHANGING: Self
There are no expectations that the block is soon going to change.
This is the default value of this type and within BlockAttributes.
Sourcepub const fn redefinition(change: AnimationChange) -> Self
pub const fn redefinition(change: AnimationChange) -> Self
Creates a hint that the block definition might be redefined,
in the ways specified by change.
Sourcepub const fn replacement(change: AnimationChange) -> Self
pub const fn replacement(change: AnimationChange) -> Self
Creates a hint that the block will be replaced with another block, which differs in the
ways specified by change.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for AnimationHint
impl<'arbitrary> Arbitrary<'arbitrary> for AnimationHint
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl BitOr for AnimationHint
impl BitOr for AnimationHint
Source§impl BitOrAssign for AnimationHint
impl BitOrAssign for AnimationHint
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl Clone for AnimationHint
impl Clone for AnimationHint
Source§fn clone(&self) -> AnimationHint
fn clone(&self) -> AnimationHint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnimationHint
impl Debug for AnimationHint
Source§impl Default for AnimationHint
impl Default for AnimationHint
Source§impl Hash for AnimationHint
impl Hash for AnimationHint
Source§impl PartialEq for AnimationHint
impl PartialEq for AnimationHint
Source§impl VisitHandles for AnimationHint
impl VisitHandles for AnimationHint
Source§fn visit_handles(&self, _: &mut dyn HandleVisitor)
fn visit_handles(&self, _: &mut dyn HandleVisitor)
impl Copy for AnimationHint
impl Eq for AnimationHint
impl StructuralPartialEq for AnimationHint
Auto Trait Implementations§
impl Freeze for AnimationHint
impl RefUnwindSafe for AnimationHint
impl Send for AnimationHint
impl Sync for AnimationHint
impl Unpin for AnimationHint
impl UnwindSafe for AnimationHint
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
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