pub struct CoherenceId {
pub constraints_hash: u64,
pub direction: Direction,
}Expand description
Identity for a layout computation, used as key in the coherence cache.
This is a subset of LayoutCacheKey that identifies a layout slot
independently of the available area. Two computations with the same
CoherenceId but different area sizes represent the same logical layout
being re-rendered at a different terminal size.
Fields§
§constraints_hash: u64Hash fingerprint of constraints.
direction: DirectionLayout direction.
Implementations§
Source§impl CoherenceId
impl CoherenceId
Sourcepub fn new(constraints: &[Constraint], direction: Direction) -> Self
pub fn new(constraints: &[Constraint], direction: Direction) -> Self
Create a coherence ID from layout parameters.
Sourcepub fn from_cache_key(key: &LayoutCacheKey) -> Self
pub fn from_cache_key(key: &LayoutCacheKey) -> Self
Create a coherence ID from an existing cache key.
Trait Implementations§
Source§impl Clone for CoherenceId
impl Clone for CoherenceId
Source§fn clone(&self) -> CoherenceId
fn clone(&self) -> CoherenceId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoherenceId
impl Debug for CoherenceId
Source§impl Hash for CoherenceId
impl Hash for CoherenceId
Source§impl PartialEq for CoherenceId
impl PartialEq for CoherenceId
impl Copy for CoherenceId
impl Eq for CoherenceId
impl StructuralPartialEq for CoherenceId
Auto Trait Implementations§
impl Freeze for CoherenceId
impl RefUnwindSafe for CoherenceId
impl Send for CoherenceId
impl Sync for CoherenceId
impl Unpin for CoherenceId
impl UnwindSafe for CoherenceId
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