Struct vegas_lattice::Site
source · pub struct Site { /* private fields */ }
Expand description
Represetns a site in a lattice.
The kind
field is the type of the site, for example Fe
for iron or Cu
for copper.
The position
field is a tuple of the x, y, and z coordinates of the site within the
lattice.
§Exalples
Here is an example of how to create a site and access its fields:
use vegas_lattice::Site;
let site = Site::new("Fe");
assert_eq!(site.kind(), "Fe");
assert_eq!(site.position(), (0.0, 0.0, 0.0));
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Site
impl<'de> Deserialize<'de> for Site
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
Auto Trait Implementations§
impl RefUnwindSafe for Site
impl Send for Site
impl Sync for Site
impl Unpin for Site
impl UnwindSafe for Site
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