pub struct PropertyId(/* private fields */);Expand description
Opaque handle of a property inside a ContinuousStructure.
Handles are returned by ContinuousStructure::add_property and
ContinuousStructure::property_id; they stay valid until the property
is removed and are never reused within one structure. Handles order by
insertion.
use csx::{ContinuousStructure, Property};
let mut s = ContinuousStructure::new();
let a = s.add_property(Property::metal("a"));
let b = s.add_property(Property::metal("b"));
assert!(a < b);
assert_eq!(s.property_id("b"), Some(b));
assert_eq!(s.property(a).unwrap().id(), a.get());Implementations§
Source§impl PropertyId
impl PropertyId
Sourcepub const fn get(self) -> u32
pub const fn get(self) -> u32
The numeric id, equal to Property::id of the referenced
property.
Trait Implementations§
Source§impl Clone for PropertyId
impl Clone for PropertyId
impl Copy for PropertyId
Source§impl Debug for PropertyId
impl Debug for PropertyId
Source§impl Display for PropertyId
impl Display for PropertyId
impl Eq for PropertyId
Source§impl Hash for PropertyId
impl Hash for PropertyId
Source§impl Ord for PropertyId
impl Ord for PropertyId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PropertyId
impl PartialEq for PropertyId
Source§impl PartialOrd for PropertyId
impl PartialOrd for PropertyId
impl StructuralPartialEq for PropertyId
Auto Trait Implementations§
impl Freeze for PropertyId
impl RefUnwindSafe for PropertyId
impl Send for PropertyId
impl Sync for PropertyId
impl Unpin for PropertyId
impl UnsafeUnpin for PropertyId
impl UnwindSafe for PropertyId
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