pub enum AtomOrView<'a> {
Atom(Atom),
View(AtomView<'a>),
}
Expand description
A copy-on-write structure for Atom
and AtomView
.
Variants§
Implementations§
Trait Implementations§
Source§impl AtomCore for AtomOrView<'_>
impl AtomCore for AtomOrView<'_>
Source§fn as_atom_view(&self) -> AtomView<'_>
fn as_atom_view(&self) -> AtomView<'_>
Take a view of the atom.
Source§fn export<W: Write>(&self, dest: W) -> Result<(), Error>
fn export<W: Write>(&self, dest: W) -> Result<(), Error>
Export the atom and state to a binary stream. It can be loaded
with Atom::import.
Source§fn collect<E: Exponent>(
&self,
x: impl AtomCore,
key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
) -> Atom
fn collect<E: Exponent>( &self, x: impl AtomCore, key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, ) -> Atom
Source§fn collect_symbol<E: Exponent>(
&self,
x: Symbol,
key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
) -> Atom
fn collect_symbol<E: Exponent>( &self, x: Symbol, key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, ) -> Atom
Collect terms involving the same power of variables or functions with the name
x
, e.g. Read moreSource§fn collect_multiple<E: Exponent>(
&self,
xs: &[impl AtomCore],
key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>,
) -> Atom
fn collect_multiple<E: Exponent>( &self, xs: &[impl AtomCore], key_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, coeff_map: Option<Box<dyn Fn(AtomView<'_>, &mut Atom)>>, ) -> Atom
Source§fn collect_factors(&self) -> Atom
fn collect_factors(&self) -> Atom
Collect common factors from (nested) sums. Read more
Source§fn coefficient_list<E: Exponent>(
&self,
xs: &[impl AtomCore],
) -> Vec<(Atom, Atom)>
fn coefficient_list<E: Exponent>( &self, xs: &[impl AtomCore], ) -> Vec<(Atom, Atom)>
Collect terms involving the same power of
x
in xs
, where xs
is a list of indeterminates.
Return the list of key-coefficient pairs Read moreSource§fn coefficient<T: AtomCore>(&self, x: T) -> Atom
fn coefficient<T: AtomCore>(&self, x: T) -> Atom
Collect terms involving the literal occurrence of
x
. Read moreSource§fn apart(&self, x: Symbol) -> Atom
fn apart(&self, x: Symbol) -> Atom
Write the expression as a sum of terms with minimal denominators in
x
. Read moreSource§fn apart_multivariate(&self) -> Atom
fn apart_multivariate(&self) -> Atom
Write the expression as a sum of terms with minimal denominators in all variables.
This method computes a Groebner basis and may therefore be slow for large inputs. Read more
Source§fn cancel(&self) -> Atom
fn cancel(&self) -> Atom
Cancel all common factors between numerators and denominators.
Any non-canceling parts of the expression will not be rewritten. Read more
Source§fn collect_num(&self) -> Atom
fn collect_num(&self) -> Atom
Collect numerical factors by removing the numerical content from additions.
For example,
-2*x + 4*x^2 + 6*x^3
will be transformed into -2*(x - 2*x^2 - 3*x^3)
. Read moreSource§fn expand(&self) -> Atom
fn expand(&self) -> Atom
Expand an expression. The function AtomCore::expand_via_poly may be faster. Read more
Source§fn expand_via_poly<E: Exponent, T: AtomCore>(
&self,
var: impl Into<Option<T>>,
) -> Atom
fn expand_via_poly<E: Exponent, T: AtomCore>( &self, var: impl Into<Option<T>>, ) -> Atom
Expand the expression by converting it to a polynomial, optionally
only in the indeterminate
var
. The parameter E
should be a numerical type
that fits the largest exponent in the expanded expression. Often,
u8
or u16
is sufficient. Read moreSource§fn expand_in<T: AtomCore>(&self, var: T) -> Atom
fn expand_in<T: AtomCore>(&self, var: T) -> Atom
Expand an expression in the variable
var
. The function AtomCore::expand_via_poly may be faster. Read moreSource§fn expand_in_symbol(&self, var: Symbol) -> Atom
fn expand_in_symbol(&self, var: Symbol) -> Atom
Expand an expression in the variable
var
. Read moreSource§fn expand_into<T: AtomCore>(
&self,
var: impl Into<Option<T>>,
out: &mut Atom,
) -> bool
fn expand_into<T: AtomCore>( &self, var: impl Into<Option<T>>, out: &mut Atom, ) -> bool
Expand an expression, returning
true
iff the expression changed. Read moreSource§fn expand_num(&self) -> Atom
fn expand_num(&self) -> Atom
Source§fn is_expanded<T: AtomCore>(&self, var: Option<T>) -> bool
fn is_expanded<T: AtomCore>(&self, var: Option<T>) -> bool
Check if the expression is expanded, optionally in only the variable or function
var
. Read moreSource§fn derivative(&self, x: Symbol) -> Atom
fn derivative(&self, x: Symbol) -> Atom
Take a derivative of the expression with respect to
x
. Read moreSource§fn derivative_into(&self, x: Symbol, out: &mut Atom) -> bool
fn derivative_into(&self, x: Symbol, out: &mut Atom) -> bool
Take a derivative of the expression with respect to
x
and
write the result in out
.
Returns true
if the derivative is non-zero. Read moreSource§fn series<T: AtomCore>(
&self,
x: Symbol,
expansion_point: T,
depth: Rational,
depth_is_absolute: bool,
) -> Result<Series<AtomField>, &'static str>
fn series<T: AtomCore>( &self, x: Symbol, expansion_point: T, depth: Rational, depth_is_absolute: bool, ) -> Result<Series<AtomField>, &'static str>
Source§fn nsolve<N: SingleFloat + Real + PartialOrd>(
&self,
x: Symbol,
init: N,
prec: N,
max_iterations: usize,
) -> Result<N, String>
fn nsolve<N: SingleFloat + Real + PartialOrd>( &self, x: Symbol, init: N, prec: N, max_iterations: usize, ) -> Result<N, String>
Find the root of a function in
x
numerically over the reals using Newton’s method. Read moreSource§fn nsolve_system<N: SingleFloat + Real + PartialOrd + InternalOrdering + Eq + Hash, T: AtomCore>(
system: &[T],
vars: &[Symbol],
init: &[N],
prec: N,
max_iterations: usize,
) -> Result<Vec<N>, String>
fn nsolve_system<N: SingleFloat + Real + PartialOrd + InternalOrdering + Eq + Hash, T: AtomCore>( system: &[T], vars: &[Symbol], init: &[N], prec: N, max_iterations: usize, ) -> Result<Vec<N>, String>
Solve a non-linear system numerically over the reals using Newton’s method. Read more
Source§fn solve_linear_system<E: PositiveExponent, T1: AtomCore, T2: AtomCore>(
system: &[T1],
vars: &[T2],
) -> Result<Vec<Atom>, String>
fn solve_linear_system<E: PositiveExponent, T1: AtomCore, T2: AtomCore>( system: &[T1], vars: &[T2], ) -> Result<Vec<Atom>, String>
Solve a system that is linear in
vars
, if possible.
Each expression in system
is understood to yield 0. Read moreSource§fn system_to_matrix<E: PositiveExponent, T1: AtomCore, T2: AtomCore>(
system: &[T1],
vars: &[T2],
) -> Result<(Matrix<RationalPolynomialField<Z, E>>, Matrix<RationalPolynomialField<Z, E>>), String>
fn system_to_matrix<E: PositiveExponent, T1: AtomCore, T2: AtomCore>( system: &[T1], vars: &[T2], ) -> Result<(Matrix<RationalPolynomialField<Z, E>>, Matrix<RationalPolynomialField<Z, E>>), String>
Convert a system of linear equations to a matrix representation, returning the matrix
and the right-hand side. Read more
Source§fn evaluate<A: AtomCore + KeyLookup, T: Real, F: Fn(&Rational) -> T + Copy>(
&self,
coeff_map: F,
const_map: &HashMap<A, T>,
function_map: &HashMap<Symbol, EvaluationFn<A, T>>,
) -> Result<T, String>
fn evaluate<A: AtomCore + KeyLookup, T: Real, F: Fn(&Rational) -> T + Copy>( &self, coeff_map: F, const_map: &HashMap<A, T>, function_map: &HashMap<Symbol, EvaluationFn<A, T>>, ) -> Result<T, String>
Evaluate a (nested) expression a single time.
For repeated evaluations, use Self::evaluator() and convert
to an optimized version or generate a compiled version of your expression. Read more
Source§fn to_evaluation_tree(
&self,
fn_map: &FunctionMap<Complex<Rational>>,
params: &[Atom],
) -> Result<EvalTree<Complex<Rational>>, String>
fn to_evaluation_tree( &self, fn_map: &FunctionMap<Complex<Rational>>, params: &[Atom], ) -> Result<EvalTree<Complex<Rational>>, String>
Convert nested expressions to a tree suitable for repeated evaluations with
different values for
params
.
All variables and all user functions in the expression must occur in the map. Read moreSource§fn evaluator(
&self,
fn_map: &FunctionMap<Complex<Rational>>,
params: &[Atom],
optimization_settings: OptimizationSettings,
) -> Result<ExpressionEvaluator<Complex<Rational>>, String>
fn evaluator( &self, fn_map: &FunctionMap<Complex<Rational>>, params: &[Atom], optimization_settings: OptimizationSettings, ) -> Result<ExpressionEvaluator<Complex<Rational>>, String>
Create an efficient evaluator for a (nested) expression.
All free parameters must appear in
params
and all other variables
and user functions in the expression must occur in the function map.
The function map may have nested expressions. Read moreSource§fn evaluator_multiple<A: AtomCore>(
exprs: &[A],
fn_map: &FunctionMap<Complex<Rational>>,
params: &[Atom],
optimization_settings: OptimizationSettings,
) -> Result<ExpressionEvaluator<Complex<Rational>>, String>
fn evaluator_multiple<A: AtomCore>( exprs: &[A], fn_map: &FunctionMap<Complex<Rational>>, params: &[Atom], optimization_settings: OptimizationSettings, ) -> Result<ExpressionEvaluator<Complex<Rational>>, String>
Convert nested expressions to a tree suitable for repeated evaluations with
different values for
params
.
All variables and all user functions in the expression must occur in the map. Read moreSource§fn zero_test(&self, iterations: usize, tolerance: f64) -> ConditionResult
fn zero_test(&self, iterations: usize, tolerance: f64) -> ConditionResult
Check if the expression could be 0, using (potentially) numerical sampling with
a given tolerance and number of iterations. Read more
Source§fn set_coefficient_ring(&self, vars: &Arc<Vec<Variable>>) -> Atom
fn set_coefficient_ring(&self, vars: &Arc<Vec<Variable>>) -> Atom
Set the coefficient ring to the multivariate rational polynomial with
vars
variables. Read moreSource§fn coefficients_to_float(&self, decimal_prec: u32) -> Atom
fn coefficients_to_float(&self, decimal_prec: u32) -> Atom
Convert all coefficients to floats with a given precision
decimal_prec
.
The precision of floating point coefficients in the input will be truncated to decimal_prec
. Read moreSource§fn coefficients_to_float_into(&self, decimal_prec: u32, out: &mut Atom)
fn coefficients_to_float_into(&self, decimal_prec: u32, out: &mut Atom)
Convert all coefficients to floats with a given precision
decimal_prec
.
The precision of floating point coefficients in the input will be truncated to decimal_prec
. Read moreSource§fn map_coefficient<F: Fn(CoefficientView<'_>) -> Coefficient + Copy>(
&self,
f: F,
) -> Atom
fn map_coefficient<F: Fn(CoefficientView<'_>) -> Coefficient + Copy>( &self, f: F, ) -> Atom
Map all coefficients using a given function. Read more
Source§fn map_coefficient_into<F: Fn(CoefficientView<'_>) -> Coefficient + Copy>(
&self,
f: F,
out: &mut Atom,
)
fn map_coefficient_into<F: Fn(CoefficientView<'_>) -> Coefficient + Copy>( &self, f: F, out: &mut Atom, )
Map all coefficients using a given function. Read more
Source§fn rationalize_coefficients(&self, relative_error: &Rational) -> Atom
fn rationalize_coefficients(&self, relative_error: &Rational) -> Atom
Map all floating point and rational coefficients to the best rational approximation
in the interval
[self*(1-relative_error),self*(1+relative_error)]
. Read moreSource§fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: Exponent>(
&self,
field: &R,
var_map: impl Into<Option<Arc<Vec<Variable>>>>,
) -> MultivariatePolynomial<R, E>
fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: Exponent>( &self, field: &R, var_map: impl Into<Option<Arc<Vec<Variable>>>>, ) -> MultivariatePolynomial<R, E>
Convert the atom to a polynomial, optionally in the variable ordering
specified by
var_map
. If new variables are encountered, they are
added to the variable map. Similarly, non-polynomial parts are automatically
defined as a new independent variable in the polynomial. Read moreSource§fn to_polynomial_in_vars<E: Exponent>(
&self,
var_map: &Arc<Vec<Variable>>,
) -> MultivariatePolynomial<AtomField, E>
fn to_polynomial_in_vars<E: Exponent>( &self, var_map: &Arc<Vec<Variable>>, ) -> MultivariatePolynomial<AtomField, E>
Convert the atom to a polynomial in specific variables.
All other parts will be collected into the coefficient, which
is a general expression. Read more
Source§fn to_rational_polynomial<R: EuclideanDomain + ConvertToRing, RO: EuclideanDomain + PolynomialGCD<E>, E: PositiveExponent>(
&self,
field: &R,
out_field: &RO,
var_map: impl Into<Option<Arc<Vec<Variable>>>>,
) -> RationalPolynomial<RO, E>where
RationalPolynomial<RO, E>: FromNumeratorAndDenominator<R, RO, E> + FromNumeratorAndDenominator<RO, RO, E>,
fn to_rational_polynomial<R: EuclideanDomain + ConvertToRing, RO: EuclideanDomain + PolynomialGCD<E>, E: PositiveExponent>(
&self,
field: &R,
out_field: &RO,
var_map: impl Into<Option<Arc<Vec<Variable>>>>,
) -> RationalPolynomial<RO, E>where
RationalPolynomial<RO, E>: FromNumeratorAndDenominator<R, RO, E> + FromNumeratorAndDenominator<RO, RO, E>,
Convert the atom to a rational polynomial, optionally in the variable ordering
specified by
var_map
. If new variables are encountered, they are
added to the variable map. Similarly, non-rational polynomial parts are automatically
defined as a new independent variable in the rational polynomial. Read moreSource§fn to_factorized_rational_polynomial<R: EuclideanDomain + ConvertToRing, RO: EuclideanDomain + PolynomialGCD<E>, E: PositiveExponent>(
&self,
field: &R,
out_field: &RO,
var_map: impl Into<Option<Arc<Vec<Variable>>>>,
) -> FactorizedRationalPolynomial<RO, E>where
FactorizedRationalPolynomial<RO, E>: FromNumeratorAndFactorizedDenominator<R, RO, E> + FromNumeratorAndFactorizedDenominator<RO, RO, E>,
MultivariatePolynomial<RO, E>: Factorize,
fn to_factorized_rational_polynomial<R: EuclideanDomain + ConvertToRing, RO: EuclideanDomain + PolynomialGCD<E>, E: PositiveExponent>(
&self,
field: &R,
out_field: &RO,
var_map: impl Into<Option<Arc<Vec<Variable>>>>,
) -> FactorizedRationalPolynomial<RO, E>where
FactorizedRationalPolynomial<RO, E>: FromNumeratorAndFactorizedDenominator<R, RO, E> + FromNumeratorAndFactorizedDenominator<RO, RO, E>,
MultivariatePolynomial<RO, E>: Factorize,
Convert the atom to a rational polynomial with factorized denominators, optionally in the variable ordering
specified by
var_map
. If new variables are encountered, they are
added to the variable map. Similarly, non-rational polynomial parts are automatically
defined as a new independent variable in the rational polynomial. Read moreSource§fn format<W: Write>(
&self,
fmt: &mut W,
opts: &PrintOptions,
print_state: PrintState,
) -> Result<bool, Error>
fn format<W: Write>( &self, fmt: &mut W, opts: &PrintOptions, print_state: PrintState, ) -> Result<bool, Error>
Format the atom. Read more
Source§fn printer(&self, opts: PrintOptions) -> AtomPrinter<'_>
fn printer(&self, opts: PrintOptions) -> AtomPrinter<'_>
Construct a printer for the atom with special options. Read more
Source§fn to_canonical_string(&self) -> String
fn to_canonical_string(&self) -> String
Print the atom in a form that is unique and independent of any implementation details. Read more
Source§fn map_terms_single_core(&self, f: impl Fn(AtomView<'_>) -> Atom) -> Atom
fn map_terms_single_core(&self, f: impl Fn(AtomView<'_>) -> Atom) -> Atom
Map the function
f
over all terms. Read moreSource§fn map_terms(
&self,
f: impl Fn(AtomView<'_>) -> Atom + Send + Sync,
n_cores: usize,
) -> Atom
fn map_terms( &self, f: impl Fn(AtomView<'_>) -> Atom + Send + Sync, n_cores: usize, ) -> Atom
Source§fn map_terms_with_pool(
&self,
f: impl Fn(AtomView<'_>) -> Atom + Send + Sync,
p: &ThreadPool,
) -> Atom
fn map_terms_with_pool( &self, f: impl Fn(AtomView<'_>) -> Atom + Send + Sync, p: &ThreadPool, ) -> Atom
Source§fn canonize_tensors<T: AtomCore, G: Ord + Hash>(
&self,
indices: &[(T, G)],
) -> Result<Atom, String>
fn canonize_tensors<T: AtomCore, G: Ord + Hash>( &self, indices: &[(T, G)], ) -> Result<Atom, String>
Canonize (products of) tensors in the expression by relabeling repeated indices.
The tensors must be written as functions, with its indices as the arguments.
Subexpressions, constants and open indices are supported. Read more
fn to_pattern(&self) -> Pattern
Source§fn get_all_symbols(&self, include_function_symbols: bool) -> HashSet<Symbol>
fn get_all_symbols(&self, include_function_symbols: bool) -> HashSet<Symbol>
Get all symbols in the expression, optionally including function symbols. Read more
Source§fn get_all_indeterminates(&self, enter_functions: bool) -> HashSet<AtomView<'_>>
fn get_all_indeterminates(&self, enter_functions: bool) -> HashSet<AtomView<'_>>
Get all variables and functions in the expression. Read more
Source§fn contains_symbol(&self, s: Symbol) -> bool
fn contains_symbol(&self, s: Symbol) -> bool
Source§fn is_polynomial(
&self,
allow_not_expanded: bool,
allow_negative_powers: bool,
) -> Option<HashSet<AtomView<'_>>>
fn is_polynomial( &self, allow_not_expanded: bool, allow_negative_powers: bool, ) -> Option<HashSet<AtomView<'_>>>
Check if the expression can be considered a polynomial in some variables, including
redefinitions. For example
f(x)+y
is considered a polynomial in f(x)
and y
, whereas
f(x)+x
is not a polynomial. Read moreSource§fn replace<'b, P: Into<BorrowedOrOwned<'b, Pattern>>>(
&self,
pattern: P,
) -> ReplaceBuilder<'_, 'b>
fn replace<'b, P: Into<BorrowedOrOwned<'b, Pattern>>>( &self, pattern: P, ) -> ReplaceBuilder<'_, 'b>
Replace all occurrences of the pattern. The right-hand side is
either another pattern, or a function that maps the matched wildcards to a new expression. Read more
Source§fn replace_multiple<T: BorrowReplacement>(&self, replacements: &[T]) -> Atom
fn replace_multiple<T: BorrowReplacement>(&self, replacements: &[T]) -> Atom
Replace all occurrences of the patterns, where replacements are tested in the order that they are given.
To repeatedly replace multiple patterns, wrap the call in [Atom::replace_map]. Read more
Source§fn replace_multiple_into<T: BorrowReplacement>(
&self,
replacements: &[T],
out: &mut Atom,
) -> bool
fn replace_multiple_into<T: BorrowReplacement>( &self, replacements: &[T], out: &mut Atom, ) -> bool
Replace all occurrences of the patterns, where replacements are tested in the order that they are given.
Returns
true
iff a match was found. Read moreSource§fn replace_map<F: FnMut(AtomView<'_>, &Context, &mut Atom) -> bool>(
&self,
m: F,
) -> Atom
fn replace_map<F: FnMut(AtomView<'_>, &Context, &mut Atom) -> bool>( &self, m: F, ) -> Atom
Replace part of an expression by calling the map
m
on each subexpression.
The function m
must return true
if the expression was replaced and must write the new expression to out
.
A Context object is passed to the function, which contains information about the current position in the expression. Read moreSource§fn visitor<F: FnMut(AtomView<'_>) -> bool>(&self, v: &mut F)
fn visitor<F: FnMut(AtomView<'_>) -> bool>(&self, v: &mut F)
Call the function
v
for every subexpression. If v
returns true
, the
subexpressions of the current expression will be visited. Read moreSource§fn pattern_match<'a: 'b, 'b, C: Into<Option<&'b Condition<PatternRestriction>>>, S: Into<Option<&'b MatchSettings>>>(
&'a self,
pattern: &'b Pattern,
conditions: C,
settings: S,
) -> PatternAtomTreeIterator<'a, 'b> ⓘ
fn pattern_match<'a: 'b, 'b, C: Into<Option<&'b Condition<PatternRestriction>>>, S: Into<Option<&'b MatchSettings>>>( &'a self, pattern: &'b Pattern, conditions: C, settings: S, ) -> PatternAtomTreeIterator<'a, 'b> ⓘ
Return an iterator over matched expressions. Read more
Source§impl<'a> Clone for AtomOrView<'a>
impl<'a> Clone for AtomOrView<'a>
Source§fn clone(&self) -> AtomOrView<'a>
fn clone(&self) -> AtomOrView<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for AtomOrView<'a>
impl<'a> Debug for AtomOrView<'a>
Source§impl Display for AtomOrView<'_>
impl Display for AtomOrView<'_>
Source§impl<'a> From<&'a Atom> for AtomOrView<'a>
impl<'a> From<&'a Atom> for AtomOrView<'a>
Source§fn from(a: &'a Atom) -> AtomOrView<'a>
fn from(a: &'a Atom) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a> From<&AtomView<'a>> for AtomOrView<'a>
impl<'a> From<&AtomView<'a>> for AtomOrView<'a>
Source§fn from(a: &AtomView<'a>) -> AtomOrView<'a>
fn from(a: &AtomView<'a>) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a Symbol> for AtomOrView<'a>
impl<'a> From<&'a Symbol> for AtomOrView<'a>
Source§fn from(s: &'a Symbol) -> AtomOrView<'a>
fn from(s: &'a Symbol) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a> From<Atom> for AtomOrView<'a>
impl<'a> From<Atom> for AtomOrView<'a>
Source§fn from(a: Atom) -> AtomOrView<'a>
fn from(a: Atom) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a> From<AtomView<'a>> for AtomOrView<'a>
impl<'a> From<AtomView<'a>> for AtomOrView<'a>
Source§fn from(a: AtomView<'a>) -> AtomOrView<'a>
fn from(a: AtomView<'a>) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a> From<Symbol> for AtomOrView<'a>
impl<'a> From<Symbol> for AtomOrView<'a>
Source§fn from(s: Symbol) -> AtomOrView<'a>
fn from(s: Symbol) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl<'a, T> From<T> for AtomOrView<'a>where
T: Into<Coefficient>,
impl<'a, T> From<T> for AtomOrView<'a>where
T: Into<Coefficient>,
Source§fn from(v: T) -> AtomOrView<'a>
fn from(v: T) -> AtomOrView<'a>
Converts to this type from the input type.
Source§impl Hash for AtomOrView<'_>
impl Hash for AtomOrView<'_>
Source§impl Ord for AtomOrView<'_>
impl Ord for AtomOrView<'_>
Source§impl PartialEq for AtomOrView<'_>
impl PartialEq for AtomOrView<'_>
Source§impl PartialOrd for AtomOrView<'_>
impl PartialOrd for AtomOrView<'_>
impl Eq for AtomOrView<'_>
Auto Trait Implementations§
impl<'a> Freeze for AtomOrView<'a>
impl<'a> RefUnwindSafe for AtomOrView<'a>
impl<'a> Send for AtomOrView<'a>
impl<'a> Sync for AtomOrView<'a>
impl<'a> Unpin for AtomOrView<'a>
impl<'a> UnwindSafe for AtomOrView<'a>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.