#[repr(transparent)]pub struct Point<T, Provenance> {
pub val: T,
/* private fields */
}
Expand description
A Point
lattice, corresponding to a single instance of T
.
Will runtime panic if a merge between inequal values is attempted.
The Provenance
generic param is a token for the origin of this point. The parameter can be
used to differentiate between points with different provenances. This will prevent them from
being merged together, avoiding any posibility of panic.
Like Conflict<T>
but will panic instead of going to a “conflict” top
state.
Can be thought of as a lattice with a domain of size one, corresponding to the specific value inside.
This also can be used to wrap non lattice data into a lattice in a way that typechecks.
Fields§
§val: T
The value stored inside. This should not be mutated.
Implementations§
Trait Implementations§
source§impl<T, Provenance> DeepReveal for Point<T, Provenance>
impl<T, Provenance> DeepReveal for Point<T, Provenance>
source§impl<'de, T, Provenance> Deserialize<'de> for Point<T, Provenance>where
T: Deserialize<'de>,
impl<'de, T, Provenance> Deserialize<'de> for Point<T, Provenance>where
T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T, Provenance> LatticeFrom<Point<T, Provenance>> for Point<T, Provenance>
impl<T, Provenance> LatticeFrom<Point<T, Provenance>> for Point<T, Provenance>
source§fn lattice_from(other: Point<T, Provenance>) -> Self
fn lattice_from(other: Point<T, Provenance>) -> Self
Convert from the
Other
lattice into Self
.source§impl<T, Provenance> PartialOrd for Point<T, Provenance>where
T: PartialEq,
impl<T, Provenance> PartialOrd for Point<T, Provenance>where
T: PartialEq,
impl<T: Copy, Provenance: Copy> Copy for Point<T, Provenance>
impl<T: Eq, Provenance: Eq> Eq for Point<T, Provenance>
impl<T, Provenance> LatticeOrd for Point<T, Provenance>where
Self: PartialOrd<Point<T, Provenance>>,
Auto Trait Implementations§
impl<T, Provenance> Freeze for Point<T, Provenance>where
T: Freeze,
impl<T, Provenance> RefUnwindSafe for Point<T, Provenance>where
T: RefUnwindSafe,
Provenance: RefUnwindSafe,
impl<T, Provenance> !Send for Point<T, Provenance>
impl<T, Provenance> !Sync for Point<T, Provenance>
impl<T, Provenance> Unpin for Point<T, Provenance>where
T: Unpin,
impl<T, Provenance> UnwindSafe for Point<T, Provenance>where
T: UnwindSafe,
Provenance: RefUnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<This, Other> NaiveLatticeOrd<Other> for This
impl<This, Other> NaiveLatticeOrd<Other> for This
source§fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>
fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>
Naive compare based on the
Merge::merge
method. This method can be very inefficient;
use PartialOrd::partial_cmp
instead. Read more