Skip to main content

ParticleProperties

Struct ParticleProperties 

Source
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

Source

pub fn name(&self) -> LadduResult<String>

Get the particle’s name

Returns an error if this property is not known.

Source

pub fn species(&self) -> LadduResult<String>

Get the particle’s species

Returns an error if this property is not known.

Source

pub fn antiparticle_species(&self) -> LadduResult<String>

Get the particle’s antiparticle species

Returns an error if this property is not known.

Source

pub fn self_conjugate(&self) -> LadduResult<bool>

Get the particle’s self-conjugate status

Returns an error if this property is not known.

Source

pub fn spin(&self) -> LadduResult<AngularMomentum>

Get the particle’s spin

Returns an error if this property is not known.

Source

pub fn parity(&self) -> LadduResult<Parity>

Get the particle’s intrinsic parity

Returns an error if this property is not known.

Source

pub fn c_parity(&self) -> LadduResult<Parity>

Get the particle’s intrinsic C-parity

Returns an error if this property is not known.

Source

pub fn g_parity(&self) -> LadduResult<Parity>

Get the particle’s intrinsic G-parity

Returns an error if this property is not known.

Source

pub fn charge(&self) -> LadduResult<Charge>

Get the particle’s electric charge

Returns an error if this property is not known.

Source

pub fn isospin(&self) -> LadduResult<Isospin>

Get the particle’s isospin

Returns an error if this property is not known.

Source

pub fn strangeness(&self) -> LadduResult<i32>

Get the particle’s strangeness

Returns an error if this property is not known.

Source

pub fn charm(&self) -> LadduResult<i32>

Get the particle’s charm

Returns an error if this property is not known.

Source

pub fn bottomness(&self) -> LadduResult<i32>

Get the particle’s bottomness

Returns an error if this property is not known.

Source

pub fn topness(&self) -> LadduResult<i32>

Get the particle’s topness

Returns an error if this property is not known.

Source

pub fn baryon_number(&self) -> LadduResult<i32>

Get the particle’s baryon number

Returns an error if this property is not known.

Source

pub fn electron_lepton_number(&self) -> LadduResult<i32>

Get the particle’s electron lepton number

Returns an error if this property is not known.

Source

pub fn muon_lepton_number(&self) -> LadduResult<i32>

Get the particle’s muon lepton number

Returns an error if this property is not known.

Source

pub fn tau_lepton_number(&self) -> LadduResult<i32>

Get the particle’s tau lepton number

Returns an error if this property is not known.

Source

pub fn statistics(&self) -> LadduResult<Statistics>

Get the particle’s statistics

Returns an error if this property is not known.

Source

pub fn unknown() -> Self

Construct a particle with no specified properties.

Source

pub fn jp(j: AngularMomentum, p: Parity) -> Self

Construct a particle with the given spin and parity.

Source

pub fn jpc(j: AngularMomentum, p: Parity, c: Parity) -> Self

Construct a particle with the given spin, parity, and C-parity.

Source

pub fn with_name(self, name: impl Into<String>) -> Self

Set the particle’s name.

Source

pub fn with_species(self, species: impl Into<String>) -> Self

Set the particle’s species.

Source

pub fn with_antiparticle_species( self, antiparticle_species: impl Into<String>, ) -> Self

Set the particle’s antiparticle species.

Source

pub fn with_self_conjugate(self, value: bool) -> Self

Set whether the particle is its own antiparticle.

Source

pub fn with_spin(self, j: AngularMomentum) -> Self

Set the particle’s spin.

Source

pub fn with_parity(self, p: Parity) -> Self

Set the particle’s intrinsic parity.

Source

pub fn with_c_parity(self, c: Parity) -> Self

Set the particle’s intrinsic C-parity.

Source

pub fn with_g_parity(self, g: Parity) -> Self

Set the particle’s intrinsic G-parity.

Source

pub fn with_charge(self, q: Charge) -> Self

Set the particle’s electric charge.

Source

pub fn with_isospin(self, isospin: Isospin) -> Self

Set the particle’s isospin state.

Source

pub fn with_strangeness(self, s: i32) -> Self

Set the particle’s total strangeness.

Source

pub fn with_charm(self, c: i32) -> Self

Set the particle’s total charm.

Source

pub fn with_bottomness(self, b: i32) -> Self

Set the particle’s total bottomness.

Source

pub fn with_topness(self, t: i32) -> Self

Set the particle’s total topness.

Source

pub fn with_baryon_number(self, b: i32) -> Self

Set the particle’s total baryon number.

Source

pub fn with_electron_lepton_number(self, e: i32) -> Self

Set the particle’s electron lepton number.

Source

pub fn with_muon_lepton_number(self, m: i32) -> Self

Set the particle’s muon lepton number.

Source

pub fn with_tau_lepton_number(self, t: i32) -> Self

Set the particle’s tau lepton number.

Source

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.

Source

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

Source§

fn clone(&self) -> ParticleProperties

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParticleProperties

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ParticleProperties

Source§

fn default() -> ParticleProperties

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ParticleProperties

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ParticleProperties

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,