[−]Enum rustpython_vm::pyobject::PyArithmaticValue
Variants
Methods
impl<T> PyArithmaticValue<T>
pub fn is_not_implemented(&self) -> bool
Returns true
if self
is of variant NotImplemented
.
pub fn is_implemented(&self) -> bool
Returns true
if self
is of variant Implemented
.
pub fn expect_implemented(self) -> T where
Self: Debug,
Self: Debug,
Unwraps the value, yielding the content of Implemented
.
Panics
Panics if the value is not Implemented
, with a panic message including the content of self
.
pub fn implemented(self) -> Option<T>
Returns Some
if self
is of variant Implemented
, and None
otherwise.
impl<T> PyArithmaticValue<T>
pub fn from_option(option: Option<T>) -> Self
pub fn into_option(self) -> Option<T>
pub fn as_option(&self) -> Option<&T>
pub fn as_option_mut(&mut self) -> Option<&mut T>
pub fn as_ref(&self) -> PyArithmaticValue<&T>
pub fn as_mut(&mut self) -> PyArithmaticValue<&mut T>
pub fn expect(self, msg: &str) -> T
pub fn unwrap(self) -> T
pub fn unwrap_or(self, default: T) -> T
pub fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> PyArithmaticValue<U>
pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U
pub fn map_or_else<U, D: FnOnce() -> U, F: FnOnce(T) -> U>(
self,
default: D,
f: F
) -> U
self,
default: D,
f: F
) -> U
pub fn ok_or<E>(self, err: E) -> Result<T, E>
pub fn ok_or_else<E, F: FnOnce() -> E>(self, err: F) -> Result<T, E>
pub fn and<U>(self, optb: PyArithmaticValue<U>) -> PyArithmaticValue<U>
pub fn and_then<U, F: FnOnce(T) -> PyArithmaticValue<U>>(
self,
f: F
) -> PyArithmaticValue<U>
self,
f: F
) -> PyArithmaticValue<U>
pub fn filter<P: FnOnce(&T) -> bool>(self, predicate: P) -> Self
pub fn or(self, optb: PyArithmaticValue<T>) -> PyArithmaticValue<T>
pub fn or_else<F: FnOnce() -> PyArithmaticValue<T>>(
self,
f: F
) -> PyArithmaticValue<T>
self,
f: F
) -> PyArithmaticValue<T>
pub fn xor(self, optb: PyArithmaticValue<T>) -> PyArithmaticValue<T>
pub fn get_or_insert(&mut self, v: T) -> &mut T
pub fn get_or_insert_with<F: FnOnce() -> T>(&mut self, f: F) -> &mut T
pub fn take(&mut self) -> Self
pub fn replace(&mut self, value: T) -> Self
impl<'_, T: Copy> PyArithmaticValue<&'_ T>
pub fn copied(self) -> PyArithmaticValue<T>
impl<'_, T: Copy> PyArithmaticValue<&'_ mut T>
pub fn copied(self) -> PyArithmaticValue<T>
impl<'_, T: Clone> PyArithmaticValue<&'_ T>
pub fn cloned(self) -> PyArithmaticValue<T>
impl<'_, T: Clone> PyArithmaticValue<&'_ mut T>
pub fn cloned(self) -> PyArithmaticValue<T>
impl<T: Default> PyArithmaticValue<T>
pub fn unwrap_or_default(self) -> T
impl<T: Deref> PyArithmaticValue<T>
pub fn as_deref(&self) -> PyArithmaticValue<&T::Target>
impl<T: DerefMut> PyArithmaticValue<T>
pub fn as_deref_mut(&mut self) -> PyArithmaticValue<&mut T::Target>
impl<T, E> PyArithmaticValue<Result<T, E>>
Trait Implementations
impl<T: Clone> Clone for PyArithmaticValue<T>
fn clone(&self) -> Self
fn clone_from(&mut self, source: &Self)
impl<T: Copy> Copy for PyArithmaticValue<T>
impl<T: Debug> Debug for PyArithmaticValue<T>
impl<T> Default for PyArithmaticValue<T>
fn default() -> PyArithmaticValue<T>
impl<T: Eq> Eq for PyArithmaticValue<T>
impl<'a, T> From<&'a PyArithmaticValue<T>> for PyArithmaticValue<&'a T>
fn from(o: &'a PyArithmaticValue<T>) -> PyArithmaticValue<&'a T>
impl<'a, T> From<&'a mut PyArithmaticValue<T>> for PyArithmaticValue<&'a mut T>
fn from(o: &'a mut PyArithmaticValue<T>) -> PyArithmaticValue<&'a mut T>
impl<T> From<T> for PyArithmaticValue<T>
fn from(val: T) -> PyArithmaticValue<T>
impl<T: Hash> Hash for PyArithmaticValue<T>
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> IntoIterator for PyArithmaticValue<T>
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> IntoIter<T>
impl<T> IntoPyObject for PyArithmaticValue<T> where
T: IntoPyObject,
[src]
T: IntoPyObject,
fn into_pyobject(self, vm: &VirtualMachine) -> PyResult
[src]
impl<T> OptionLike<T> for PyArithmaticValue<T>
impl<T: Ord> Ord for PyArithmaticValue<T>
fn cmp(&self, other: &PyArithmaticValue<T>) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<PyArithmaticValue<T>> for PyArithmaticValue<T>
fn eq(&self, other: &PyArithmaticValue<T>) -> bool
fn ne(&self, other: &PyArithmaticValue<T>) -> bool
impl<T: PartialOrd> PartialOrd<PyArithmaticValue<T>> for PyArithmaticValue<T>
fn partial_cmp(&self, other: &PyArithmaticValue<T>) -> Option<Ordering>
fn lt(&self, other: &PyArithmaticValue<T>) -> bool
fn le(&self, other: &PyArithmaticValue<T>) -> bool
fn gt(&self, other: &PyArithmaticValue<T>) -> bool
fn ge(&self, other: &PyArithmaticValue<T>) -> bool
impl<T> StructuralEq for PyArithmaticValue<T>
impl<T> StructuralPartialEq for PyArithmaticValue<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for PyArithmaticValue<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for PyArithmaticValue<T> where
T: Send,
T: Send,
impl<T> Sync for PyArithmaticValue<T> where
T: Sync,
T: Sync,
impl<T> Unpin for PyArithmaticValue<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PyArithmaticValue<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> IntoPyObject for T where
T: PyValue,
[src]
T: PyValue,
fn into_pyobject(
Self,
&VirtualMachine
) -> Result<Rc<PyObject<dyn PyObjectPayload + 'static>>, PyRef<PyBaseException>>
[src]
Self,
&VirtualMachine
) -> Result<Rc<PyObject<dyn PyObjectPayload + 'static>>, PyRef<PyBaseException>>
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Statistics<f64> for T where
T: IntoIterator,
<T as IntoIterator>::Item: Borrow<f64>,
T: IntoIterator,
<T as IntoIterator>::Item: Borrow<f64>,
fn min(self) -> f64
fn max(self) -> f64
fn abs_min(self) -> f64
fn abs_max(self) -> f64
fn mean(self) -> f64
fn geometric_mean(self) -> f64
fn harmonic_mean(self) -> f64
fn variance(self) -> f64
fn std_dev(self) -> f64
fn population_variance(self) -> f64
fn population_std_dev(self) -> f64
fn covariance(self, other: T) -> f64
fn population_covariance(self, other: T) -> f64
fn quadratic_mean(self) -> f64
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,