Skip to main content

Model

Struct Model 

Source
pub struct Model { /* private fields */ }
Expand description

A validated physics model with fallible, indexed lookups.

Implementations§

Source§

impl Model

Source

pub fn standard_model() -> Self

Load a fresh copy of the complete embedded Standard Model (sm).

Includes 43 particles and 163 vertices with their default parameter values. The compressed data is decoded on demand, without file access or a Python/UFO runtime.

Source

pub fn qcd() -> Self

The Standard Model’s QCD sector: six quark flavors, gluons, and gluon ghosts. Keeps the Standard Model parameters and their default values.

Source

pub fn qed() -> Self

The Standard Model’s QED sector: photons and all charged fermions, including quarks. Keeps the Standard Model parameters and their defaults.

Source

pub fn electroweak() -> Self

The electroweak Standard Model, including quarks, Higgs, Goldstones, and electroweak ghosts, with gluons and gluon ghosts removed.

Source

pub fn qcd_qed() -> Self

Strong and electromagnetic interactions of all quarks and charged leptons, including gluon ghosts, with Standard Model parameters.

Source

pub fn yang_mills() -> Self

Pure SU(3) Yang–Mills theory: gluons and gluon ghosts, without quarks. Preserves the Standard Model parameters and their default values.

Source

pub fn phi3() -> Self

One real scalar phi with L_int = -g phi^3 / 3!. External parameters mass and g default to one; the width is zero.

Source

pub fn phi4() -> Self

One real scalar phi with L_int = -lam phi^4 / 4!. External parameters mass and lam default to one; the width is zero.

Source

pub fn phi_3_4() -> Self

One real scalar phi with L_int = -g phi^3 / 3! - lam phi^4 / 4!. External parameters mass, g, and lam default to one; the width is zero.

Source

pub fn scalar_qed() -> Self

Scalar electrodynamics in Feynman gauge, with a, phi+, and phi-. mass and e default to one, and lam defaults to zero. The scalar potential is mass^2 |phi|^2 + lam |phi|^4 / 4; all widths vanish.

Source§

impl Model

Source

pub fn with_parameter_display_transaction<T, E>( operation: impl FnOnce() -> Result<T, E>, ) -> Result<T, E>

Publish model-owned parameter labels only if a synchronous operation succeeds.

Use this around model construction and application-level validation when the application can reject an otherwise valid model. Existing expressions keep their committed labels until the operation returns successfully. Nested successful operations join their parent’s transaction. A failure or panic discards pending updates without reverting other threads’ work.

Use this around a complete decode when the format or enclosing object can fail after deserializing a valid model value, for example when Serde checks for trailing input. For a standalone JSON document, prefer Self::from_json, which parses the complete definition before constructing the model.

Parsing still interns immutable symbols and their printing callbacks. This transaction stages label values on the calling thread; worker-thread model imports have their own independent registration scope.

Source

pub fn register_parameter_symbol( name: &str, texname: Option<&str>, typstname: Option<&str>, ) -> Result<(), ModelError>

Declare a parameter’s printer before parsing model expressions.

Import adapters which parse expressions before constructing a Model must call this for every parameter first, including forward references. Repeated declarations update labels; missing/empty labels restore the ordinary spelling. Existing user-declared symbol printers are preserved.

Source

pub fn register_parameter_display( name: &str, texname: Option<&str>, typstname: Option<&str>, mathml: Option<&ParameterMathMl>, ) -> Result<(), ModelError>

Register model-owned symbolic labels for LaTeX, Typst, and native MathML.

The MathML label is a presentation fragment, without a wrapping <math>. Missing labels retain the ordinary symbol spelling in that format. Importers validate every label in a model before calling this function.

§Errors

Returns an error for a malformed symbol name.

Source§

impl Model

Source

pub fn empty(name: impl Into<String>) -> Self

Construct an empty, validated model for application state that has not loaded a physics model yet.

Source

pub fn covariant_cut_multiplets(&self) -> &BTreeMap<i64, [i64; 4]>

Physical vector PDG -> [vector, Goldstone, ghost, antighost]. Equal masses do not infer a quartet.

Source

pub fn covariant_cut_multiplets_mut(&mut self) -> &mut BTreeMap<i64, [i64; 4]>

Invalidate the model identity before editing its covariant partner declarations. Call Self::validate_covariant_cut_multiplets after editing.

Source

pub fn validate_covariant_cut_multiplets(&self) -> Result<(), ModelError>

Source

pub fn covariant_cut_states( &self, states: &[Vec<i64>], ) -> Result<Vec<Vec<i64>>, ModelError>

Covariant completeness acts on whole final-state multisets. Mixed vector/Goldstone states and the two ghost charges remain distinct; graph automorphisms supply their symmetry factors exactly once.

Source

pub fn from_json(json: &str) -> Result<Self, ModelError>

Source

pub fn from_path(path: impl AsRef<Path>) -> Result<Self, ModelError>

Source

pub fn to_json(&self) -> Result<String, ModelError>

Source

pub fn to_json_pretty(&self) -> Result<String, ModelError>

Source

pub fn write_json(&self, path: impl AsRef<Path>) -> Result<(), ModelError>

Source

pub fn fingerprint(&self) -> ModelFingerprint

Source

pub fn structure_fingerprint(&self) -> ModelFingerprint

The Self::fingerprint of this model with every numeric parameter and coupling value removed.

It identifies what serialized diagrams bind to: particles and their order, vertex rules, propagators, parameter names and expressions, couplings and orders. Updating parameter values, or evaluating dependents with another floating-point library, keeps it unchanged.

Source

pub fn simplify_zero_values(&mut self) -> Result<(), ModelError>

Remove parameters and interactions that evaluate to zero, rebuilding all typed identifiers atomically after compaction.

Source

pub fn name(&self) -> &str

Source

pub fn restriction(&self) -> Option<&str>

Source

pub fn with_restriction( &self, restriction: Option<String>, ) -> Result<Self, ModelError>

Return an independently validated model with updated restriction metadata.

The original model is left unchanged, and the returned model has its own canonical fingerprint. This keeps restriction changes from bypassing the model’s validation and indexing boundary.

Source

pub fn orders(&self) -> &[Order]

Source

pub fn parameters(&self) -> &[Parameter]

Source

pub fn particles(&self) -> &[Particle]

Source

pub fn propagators(&self) -> &[Propagator]

Source

pub fn lorentz_structures(&self) -> &[LorentzStructure]

Source

pub fn couplings(&self) -> &[Coupling]

Source

pub fn vertex_rules(&self) -> &[VertexRule]

Source

pub fn functions(&self) -> &[ModelFunction]

Source

pub fn form_factors(&self) -> &[ModelFormFactor]

Source

pub fn particle_id(&self, name: &str) -> Result<ParticleId, ModelError>

Source

pub fn particle_id_by_pdg(&self, pdg: i64) -> Result<ParticleId, ModelError>

Source

pub fn particle(&self, name: &str) -> Result<&Particle, ModelError>

Source

pub fn particle_by_pdg(&self, pdg: i64) -> Result<&Particle, ModelError>

Source

pub fn particle_by_id(&self, id: ParticleId) -> Result<&Particle, ModelError>

Source

pub fn particle_id_at(&self, index: usize) -> Result<ParticleId, ModelError>

Source

pub fn antiparticle(&self, particle: &Particle) -> Result<&Particle, ModelError>

Source

pub fn particle_is_self_conjugate(&self, particle: ParticleId) -> bool

Source

pub fn particle_mass( &self, particle: ParticleId, ) -> Result<&Parameter, ModelError>

Source

pub fn particle_width( &self, particle: ParticleId, ) -> Result<&Parameter, ModelError>

Source

pub fn particle_is_massless(&self, particle: ParticleId) -> bool

Source

pub fn scalar_symbol(&self, name: &str) -> Option<Symbol>

Look up the symbol for a parameter or coupling declared by this model.

use feynkit_model::Model;
use symbolica::symbol;
assert_eq!(Model::phi4().scalar_symbol("lam"), Some(symbol!("UFO::lam")));
Source

pub fn parameter_id(&self, name: &str) -> Result<ParameterId, ModelError>

Source

pub fn parameter(&self, name: &str) -> Result<&Parameter, ModelError>

Source

pub fn parameter_by_id(&self, id: ParameterId) -> Result<&Parameter, ModelError>

Source

pub fn coupling_id(&self, name: &str) -> Result<CouplingId, ModelError>

Source

pub fn coupling(&self, name: &str) -> Result<&Coupling, ModelError>

Source

pub fn coupling_by_id(&self, id: CouplingId) -> Result<&Coupling, ModelError>

Source

pub fn expand_couplings(&self, expression: &Atom) -> Atom

Replace named UFO vertex coefficients by their analytic model expressions.

Generated diagrams deliberately retain symbols such as UFO::GC_11 so numerical consumers can use the model’s precomputed coupling values. This non-mutating expansion is the explicit boundary for symbolic inspection and algebra in terms of the underlying model parameters.

Source

pub fn expand_parameters(&self, expression: &Atom) -> Result<Atom, ModelError>

Expand internal analytic parameter definitions to their external inputs.

Linnet orders the definitions by their dependencies, and Symbolica performs the exact substitutions. External parameters and internal parameters with only numerical values remain symbolic: this never reads a parameter card or converts binary64 defaults into symbolic constants.

All internal analytic definitions must be acyclic, including unused ones. The cycle error lists definitions still blocked by a cycle, which may include definitions depending on that cycle. The model and input expression are unchanged, and applying this expansion twice gives the same result.

Source

pub fn order_id(&self, name: &str) -> Result<OrderId, ModelError>

Source

pub fn order(&self, name: &str) -> Result<&Order, ModelError>

Source

pub fn order_by_id(&self, id: OrderId) -> Result<&Order, ModelError>

Source

pub fn propagator_id(&self, name: &str) -> Result<PropagatorId, ModelError>

Source

pub fn propagator(&self, name: &str) -> Result<&Propagator, ModelError>

Source

pub fn propagator_by_id( &self, id: PropagatorId, ) -> Result<&Propagator, ModelError>

Source

pub fn particle_propagator( &self, particle: &Particle, ) -> Result<Option<(PropagatorId, bool)>, ModelError>

Resolve a particle’s explicit or default propagator, then its antiparticle’s. The boolean records whether the template belongs to the antiparticle and its numerator slots must be reversed during instantiation.

Source

pub fn propagator_id_at(&self, index: usize) -> Result<PropagatorId, ModelError>

Source

pub fn lorentz_structure_id( &self, name: &str, ) -> Result<LorentzStructureId, ModelError>

Source

pub fn lorentz_structure( &self, name: &str, ) -> Result<&LorentzStructure, ModelError>

Source

pub fn lorentz_structure_by_id( &self, id: LorentzStructureId, ) -> Result<&LorentzStructure, ModelError>

Source

pub fn vertex_rule_id(&self, name: &str) -> Result<VertexRuleId, ModelError>

Source

pub fn vertex_rule(&self, name: &str) -> Result<&VertexRule, ModelError>

Source

pub fn vertex_rule_by_id( &self, id: VertexRuleId, ) -> Result<&VertexRule, ModelError>

Source

pub fn vertex_rule_id_at( &self, index: usize, ) -> Result<VertexRuleId, ModelError>

Source

pub fn function(&self, name: &str) -> Result<&ModelFunction, ModelError>

Source

pub fn function_id(&self, name: &str) -> Result<ModelFunctionId, ModelError>

Source

pub fn function_by_id( &self, id: ModelFunctionId, ) -> Result<&ModelFunction, ModelError>

Source

pub fn form_factor(&self, name: &str) -> Result<&ModelFormFactor, ModelError>

Source

pub fn form_factor_id( &self, name: &str, ) -> Result<ModelFormFactorId, ModelError>

Source

pub fn form_factor_by_id( &self, id: ModelFormFactorId, ) -> Result<&ModelFormFactor, ModelError>

Source

pub fn default_parameter_card(&self) -> Result<ParameterCard, ModelError>

Source

pub fn apply_parameter_card( &mut self, card: &ParameterCard, ) -> Result<(), ModelError>

Apply a parameter card atomically and invalidate dependent values not explicitly supplied by the card.

Use Self::apply_parameter_card_with to recompute those values in the same atomic operation.

Source

pub fn recompute_with<E>( &mut self, evaluator: &mut E, ) -> Result<(), RecomputeError<E::Error>>
where E: ModelEvaluator,

Recompute all expression-backed parameters and couplings atomically.

Source

pub fn apply_parameter_card_with<E>( &mut self, card: &ParameterCard, evaluator: &mut E, ) -> Result<(), RecomputeError<E::Error>>
where E: ModelEvaluator,

Apply parameter values and recompute all dependents as one atomic model update.

Source§

impl Model

Source

pub fn scalar_bindings( &self, card: Option<&ParameterCard>, overrides: &BTreeMap<Symbol, Atom>, ) -> Result<BTreeMap<Symbol, Atom>, ModelError>

Return exact scalar bindings for this model without changing it.

The optional card is applied to a copy. External parameters and explicit card values become exact complex rationals representing their binary64 values. Internal parameters retain their analytic definitions unless explicitly supplied by the card; cached dependent values are never used instead of those definitions. Couplings remain analytic until the named dependencies are substituted, without floating-point recomputation. Arbitrary-precision inputs can be supplied directly as atoms in overrides. To keep a parameter for later numerical or Dual evaluation, override it with a distinct free symbol outside the binding map; a self-reference would instead be an unresolved dependency.

Exact overrides take precedence over both model and card definitions before closure. Additional scalar keys are allowed. The returned map has no dependencies on its own keys, but may retain other symbols/functions; it is not an evaluator for arbitrary UFO functions or form factors.

Pass the restriction card explicitly even for a model to which it was previously applied: the model does not retain internal-override history.

Trait Implementations§

Source§

impl Clone for Model

Source§

fn clone(&self) -> Model

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 Model

Source§

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

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

impl<Context> Decode<Context> for Model

Source§

fn decode<D: Decoder<Context = Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl<'de> Deserialize<'de> for Model

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 Encode for Model

Source§

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl Serialize for Model

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§

§

impl !Freeze for Model

§

impl !RefUnwindSafe for Model

§

impl !UnwindSafe for Model

§

impl Send for Model

§

impl Sync for Model

§

impl Unpin for Model

§

impl UnsafeUnpin for Model

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> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

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

Source§

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

Source§

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

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

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

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.