pub struct SimplexKey(/* private fields */);Expand description
Key type for accessing simplices in the storage map.
This creates a unique, type-safe identifier for simplices stored in the triangulation’s simplex storage. Each SimplexKey corresponds to exactly one simplex and provides efficient, stable access even as simplices are added or removed during triangulation operations.
§Examples
use delaunay::prelude::*;
let vertices = [
vertex!([0.0, 0.0]),
vertex!([1.0, 0.0]),
vertex!([0.0, 1.0]),
];
let dt = DelaunayTriangulationBuilder::new(&vertices).build::<()>()?;
let Some(key) = dt.tds().simplex_keys().next() else {
return Ok(());
};
let _ = key;Trait Implementations§
Source§impl Clone for SimplexKey
impl Clone for SimplexKey
Source§fn clone(&self) -> SimplexKey
fn clone(&self) -> SimplexKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SimplexKey
impl Debug for SimplexKey
Source§impl Default for SimplexKey
impl Default for SimplexKey
Source§fn default() -> SimplexKey
fn default() -> SimplexKey
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SimplexKey
impl<'de> Deserialize<'de> for SimplexKey
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 From<KeyData> for SimplexKey
impl From<KeyData> for SimplexKey
Source§impl Hash for SimplexKey
impl Hash for SimplexKey
Source§impl Key for SimplexKey
impl Key for SimplexKey
Source§fn null() -> Self
fn null() -> Self
Creates a new key that is always invalid and distinct from any non-null
key. A null key can only be created through this method (or default
initialization of keys made with
new_key_type!, which calls this
method). Read moreSource§impl Ord for SimplexKey
impl Ord for SimplexKey
Source§fn cmp(&self, other: &SimplexKey) -> Ordering
fn cmp(&self, other: &SimplexKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SimplexKey
impl PartialEq for SimplexKey
Source§fn eq(&self, other: &SimplexKey) -> bool
fn eq(&self, other: &SimplexKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SimplexKey
impl PartialOrd for SimplexKey
Source§impl Serialize for SimplexKey
impl Serialize for SimplexKey
impl Copy for SimplexKey
impl Eq for SimplexKey
impl StructuralPartialEq for SimplexKey
Auto Trait Implementations§
impl Freeze for SimplexKey
impl RefUnwindSafe for SimplexKey
impl Send for SimplexKey
impl Sync for SimplexKey
impl Unpin for SimplexKey
impl UnsafeUnpin for SimplexKey
impl UnwindSafe for SimplexKey
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