pub struct Spin {
pub doubled: i8,
}Expand description
A spin value expressed as doubled units of hbar.
Fields§
§doubled: i8Spin measured in doubled units of hbar.
Implementations§
Source§impl Spin
impl Spin
Sourcepub const fn new_doubled(doubled: i8) -> Spin
pub const fn new_doubled(doubled: i8) -> Spin
Creates a spin from doubled units of hbar.
Sourcepub fn as_units_of_hbar(self) -> f64
pub fn as_units_of_hbar(self) -> f64
Returns the spin in units of hbar.
Sourcepub const fn is_integer(self) -> bool
pub const fn is_integer(self) -> bool
Returns true when the spin is an integer multiple of hbar.
Sourcepub const fn is_half_integer(self) -> bool
pub const fn is_half_integer(self) -> bool
Returns true when the spin is a half-integer multiple of hbar.
Trait Implementations§
impl Copy for Spin
impl Eq for Spin
impl StructuralPartialEq for Spin
Auto Trait Implementations§
impl Freeze for Spin
impl RefUnwindSafe for Spin
impl Send for Spin
impl Sync for Spin
impl Unpin for Spin
impl UnsafeUnpin for Spin
impl UnwindSafe for Spin
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