pub struct CustomGeometry { /* private fields */ }Expand description
A custom ordered collection of finite Cartesian sites.
Implementations§
Source§impl CustomGeometry
impl CustomGeometry
Sourcepub fn new(
coordinates: Vec<Coordinate>,
) -> Result<CustomGeometry, GeometryError>
pub fn new( coordinates: Vec<Coordinate>, ) -> Result<CustomGeometry, GeometryError>
Construct a custom geometry; vector position is the canonical site id.
Sourcepub const fn site_count(&self) -> SiteCount
pub const fn site_count(&self) -> SiteCount
Number of custom sites.
Sourcepub fn coordinate(&self, site: SiteId) -> Result<Coordinate, GeometryError>
pub fn coordinate(&self, site: SiteId) -> Result<Coordinate, GeometryError>
Return a custom site’s coordinate.
Sourcepub fn complete_bonds(&self) -> Result<Vec<Bond>, GeometryError>
pub fn complete_bonds(&self) -> Result<Vec<Bond>, GeometryError>
Generate the complete simple graph of unordered custom-site pairs.
Trait Implementations§
Source§impl Clone for CustomGeometry
impl Clone for CustomGeometry
Source§fn clone(&self) -> CustomGeometry
fn clone(&self) -> CustomGeometry
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 CustomGeometry
impl Debug for CustomGeometry
Source§impl PartialEq for CustomGeometry
impl PartialEq for CustomGeometry
impl StructuralPartialEq for CustomGeometry
Auto Trait Implementations§
impl Freeze for CustomGeometry
impl RefUnwindSafe for CustomGeometry
impl Send for CustomGeometry
impl Sync for CustomGeometry
impl Unpin for CustomGeometry
impl UnsafeUnpin for CustomGeometry
impl UnwindSafe for CustomGeometry
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