pub struct ParticleProperties {Show 19 fields
pub name: Option<String>,
pub species: Option<String>,
pub antiparticle_species: Option<String>,
pub self_conjugate: Option<bool>,
pub spin: Option<AngularMomentum>,
pub parity: Option<Parity>,
pub c_parity: Option<Parity>,
pub g_parity: Option<Parity>,
pub charge: Option<Charge>,
pub isospin: Option<Isospin>,
pub strangeness: Option<i32>,
pub charm: Option<i32>,
pub bottomness: Option<i32>,
pub topness: Option<i32>,
pub baryon_number: Option<i32>,
pub electron_lepton_number: Option<i32>,
pub muon_lepton_number: Option<i32>,
pub tau_lepton_number: Option<i32>,
pub statistics: Option<Statistics>,
}Expand description
The set of properties which define the quantum state of a particle.
Fields§
§name: Option<String>The name of the particle, if known.
species: Option<String>The species of the particle, if known (used to compare to ParticleProperties::antiparticle_species).
antiparticle_species: Option<String>The species of the particle’s antiparticle, if known (used to compare to ParticleProperties::species).
self_conjugate: Option<bool>Whether the particle is its own antiparticle.
spin: Option<AngularMomentum>The spin of the particle, if known.
parity: Option<Parity>The intrinsic parity of the particle, if known.
c_parity: Option<Parity>The intrinsic C-parity of the particle, if known or applicable.
g_parity: Option<Parity>The intrinsic G-parity of the particle, if known or applicable.
charge: Option<Charge>The electric charge of the particle, if known.
isospin: Option<Isospin>The isospin of the particle, if known.
strangeness: Option<i32>The total strangeness of the particle, if known.
charm: Option<i32>The total charm of the particle, if known.
bottomness: Option<i32>The total bottomness of the particle, if known.
topness: Option<i32>The total topness of the particle, if known.
baryon_number: Option<i32>The total baryon number of the particle, if known.
electron_lepton_number: Option<i32>The electron lepton number of the particle, if known.
muon_lepton_number: Option<i32>The muon lepton number of the particle, if known.
tau_lepton_number: Option<i32>The tau lepton number of the particle, if known.
statistics: Option<Statistics>The particle’s statistical nature, if known.
Implementations§
Source§impl ParticleProperties
impl ParticleProperties
Sourcepub fn name(&self) -> LadduResult<String>
pub fn name(&self) -> LadduResult<String>
Get the particle’s name
Returns an error if this property is not known.
Sourcepub fn species(&self) -> LadduResult<String>
pub fn species(&self) -> LadduResult<String>
Get the particle’s species
Returns an error if this property is not known.
Sourcepub fn antiparticle_species(&self) -> LadduResult<String>
pub fn antiparticle_species(&self) -> LadduResult<String>
Get the particle’s antiparticle species
Returns an error if this property is not known.
Sourcepub fn self_conjugate(&self) -> LadduResult<bool>
pub fn self_conjugate(&self) -> LadduResult<bool>
Get the particle’s self-conjugate status
Returns an error if this property is not known.
Sourcepub fn spin(&self) -> LadduResult<AngularMomentum>
pub fn spin(&self) -> LadduResult<AngularMomentum>
Get the particle’s spin
Returns an error if this property is not known.
Sourcepub fn parity(&self) -> LadduResult<Parity>
pub fn parity(&self) -> LadduResult<Parity>
Get the particle’s intrinsic parity
Returns an error if this property is not known.
Sourcepub fn c_parity(&self) -> LadduResult<Parity>
pub fn c_parity(&self) -> LadduResult<Parity>
Get the particle’s intrinsic C-parity
Returns an error if this property is not known.
Sourcepub fn g_parity(&self) -> LadduResult<Parity>
pub fn g_parity(&self) -> LadduResult<Parity>
Get the particle’s intrinsic G-parity
Returns an error if this property is not known.
Sourcepub fn charge(&self) -> LadduResult<Charge>
pub fn charge(&self) -> LadduResult<Charge>
Get the particle’s electric charge
Returns an error if this property is not known.
Sourcepub fn isospin(&self) -> LadduResult<Isospin>
pub fn isospin(&self) -> LadduResult<Isospin>
Get the particle’s isospin
Returns an error if this property is not known.
Sourcepub fn strangeness(&self) -> LadduResult<i32>
pub fn strangeness(&self) -> LadduResult<i32>
Get the particle’s strangeness
Returns an error if this property is not known.
Sourcepub fn charm(&self) -> LadduResult<i32>
pub fn charm(&self) -> LadduResult<i32>
Get the particle’s charm
Returns an error if this property is not known.
Sourcepub fn bottomness(&self) -> LadduResult<i32>
pub fn bottomness(&self) -> LadduResult<i32>
Get the particle’s bottomness
Returns an error if this property is not known.
Sourcepub fn topness(&self) -> LadduResult<i32>
pub fn topness(&self) -> LadduResult<i32>
Get the particle’s topness
Returns an error if this property is not known.
Sourcepub fn baryon_number(&self) -> LadduResult<i32>
pub fn baryon_number(&self) -> LadduResult<i32>
Get the particle’s baryon number
Returns an error if this property is not known.
Sourcepub fn electron_lepton_number(&self) -> LadduResult<i32>
pub fn electron_lepton_number(&self) -> LadduResult<i32>
Get the particle’s electron lepton number
Returns an error if this property is not known.
Sourcepub fn muon_lepton_number(&self) -> LadduResult<i32>
pub fn muon_lepton_number(&self) -> LadduResult<i32>
Get the particle’s muon lepton number
Returns an error if this property is not known.
Sourcepub fn tau_lepton_number(&self) -> LadduResult<i32>
pub fn tau_lepton_number(&self) -> LadduResult<i32>
Get the particle’s tau lepton number
Returns an error if this property is not known.
Sourcepub fn statistics(&self) -> LadduResult<Statistics>
pub fn statistics(&self) -> LadduResult<Statistics>
Get the particle’s statistics
Returns an error if this property is not known.
Sourcepub fn jp(j: AngularMomentum, p: Parity) -> Self
pub fn jp(j: AngularMomentum, p: Parity) -> Self
Construct a particle with the given spin and parity.
Sourcepub fn jpc(j: AngularMomentum, p: Parity, c: Parity) -> Self
pub fn jpc(j: AngularMomentum, p: Parity, c: Parity) -> Self
Construct a particle with the given spin, parity, and C-parity.
Sourcepub fn with_species(self, species: impl Into<String>) -> Self
pub fn with_species(self, species: impl Into<String>) -> Self
Set the particle’s species.
Sourcepub fn with_antiparticle_species(
self,
antiparticle_species: impl Into<String>,
) -> Self
pub fn with_antiparticle_species( self, antiparticle_species: impl Into<String>, ) -> Self
Set the particle’s antiparticle species.
Sourcepub fn with_self_conjugate(self, value: bool) -> Self
pub fn with_self_conjugate(self, value: bool) -> Self
Set whether the particle is its own antiparticle.
Sourcepub fn with_spin(self, j: AngularMomentum) -> Self
pub fn with_spin(self, j: AngularMomentum) -> Self
Set the particle’s spin.
Sourcepub fn with_parity(self, p: Parity) -> Self
pub fn with_parity(self, p: Parity) -> Self
Set the particle’s intrinsic parity.
Sourcepub fn with_c_parity(self, c: Parity) -> Self
pub fn with_c_parity(self, c: Parity) -> Self
Set the particle’s intrinsic C-parity.
Sourcepub fn with_g_parity(self, g: Parity) -> Self
pub fn with_g_parity(self, g: Parity) -> Self
Set the particle’s intrinsic G-parity.
Sourcepub fn with_charge(self, q: Charge) -> Self
pub fn with_charge(self, q: Charge) -> Self
Set the particle’s electric charge.
Sourcepub fn with_isospin(self, isospin: Isospin) -> Self
pub fn with_isospin(self, isospin: Isospin) -> Self
Set the particle’s isospin state.
Sourcepub fn with_strangeness(self, s: i32) -> Self
pub fn with_strangeness(self, s: i32) -> Self
Set the particle’s total strangeness.
Sourcepub fn with_charm(self, c: i32) -> Self
pub fn with_charm(self, c: i32) -> Self
Set the particle’s total charm.
Sourcepub fn with_bottomness(self, b: i32) -> Self
pub fn with_bottomness(self, b: i32) -> Self
Set the particle’s total bottomness.
Sourcepub fn with_topness(self, t: i32) -> Self
pub fn with_topness(self, t: i32) -> Self
Set the particle’s total topness.
Sourcepub fn with_baryon_number(self, b: i32) -> Self
pub fn with_baryon_number(self, b: i32) -> Self
Set the particle’s total baryon number.
Sourcepub fn with_electron_lepton_number(self, e: i32) -> Self
pub fn with_electron_lepton_number(self, e: i32) -> Self
Set the particle’s electron lepton number.
Sourcepub fn with_muon_lepton_number(self, m: i32) -> Self
pub fn with_muon_lepton_number(self, m: i32) -> Self
Set the particle’s muon lepton number.
Sourcepub fn with_tau_lepton_number(self, t: i32) -> Self
pub fn with_tau_lepton_number(self, t: i32) -> Self
Set the particle’s tau lepton number.
Sourcepub fn with_statistics(self, s: Statistics) -> LadduResult<Self>
pub fn with_statistics(self, s: Statistics) -> LadduResult<Self>
Set the particle’s statistical nature.
Returns an error if the spin and statistics do not match.
Sourcepub fn is_antiparticle_of(&self, other: &ParticleProperties) -> bool
pub fn is_antiparticle_of(&self, other: &ParticleProperties) -> bool
Returns true if self is the antiparticle of other.
Trait Implementations§
Source§impl Clone for ParticleProperties
impl Clone for ParticleProperties
Source§fn clone(&self) -> ParticleProperties
fn clone(&self) -> ParticleProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParticleProperties
impl Debug for ParticleProperties
Source§impl Default for ParticleProperties
impl Default for ParticleProperties
Source§fn default() -> ParticleProperties
fn default() -> ParticleProperties
Source§impl<'de> Deserialize<'de> for ParticleProperties
impl<'de> Deserialize<'de> for ParticleProperties
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>,
Auto Trait Implementations§
impl Freeze for ParticleProperties
impl RefUnwindSafe for ParticleProperties
impl Send for ParticleProperties
impl Sync for ParticleProperties
impl Unpin for ParticleProperties
impl UnsafeUnpin for ParticleProperties
impl UnwindSafe for ParticleProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.