GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • rustpython_vm
  • pyobject

This view

  • Original page
  • New address

GeezerVison is showing rustpython.github.io — rustpython_vm::pyobject::PyArithmaticValue - Rust

[−]Enum rustpython_vm::pyobject::PyArithmaticValue

pub enum PyArithmaticValue<T> {
    NotImplemented,
    Implemented(T),
}

Variants

NotImplemented
Implemented(T)

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, 

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

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>

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>

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>>

pub fn transpose(self) -> Result<Option<T>, E>

Trait Implementations

impl<T: Clone> Clone for PyArithmaticValue<T>

fn clone(&self) -> Self

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for PyArithmaticValue<T>

impl<T: Debug> Debug for PyArithmaticValue<T>

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

Formats the value using the given formatter. Read more

impl<T> Default for PyArithmaticValue<T>

fn default() -> PyArithmaticValue<T>

Returns the "default value" for a type. Read more

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>

Performs the conversion.

impl<'a, T> From<&'a mut PyArithmaticValue<T>> for PyArithmaticValue<&'a mut T>

fn from(o: &'a mut PyArithmaticValue<T>) -> PyArithmaticValue<&'a mut T>

Performs the conversion.

impl<T> From<T> for PyArithmaticValue<T>

fn from(val: T) -> PyArithmaticValue<T>

Performs the conversion.

impl<T: Hash> Hash for PyArithmaticValue<T>

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given [Hasher]. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher, 
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

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>

Creates an iterator from a value. Read more

impl<T> IntoPyObject for PyArithmaticValue<T> where
    T: IntoPyObject, 
[src]

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

This method returns an Ordering between self and other. Read more

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<T: PartialEq> PartialEq<PyArithmaticValue<T>> for PyArithmaticValue<T>

fn eq(&self, other: &PyArithmaticValue<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &PyArithmaticValue<T>) -> bool

This method tests for !=.

impl<T: PartialOrd> PartialOrd<PyArithmaticValue<T>> for PyArithmaticValue<T>

fn partial_cmp(&self, other: &PyArithmaticValue<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &PyArithmaticValue<T>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &PyArithmaticValue<T>) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &PyArithmaticValue<T>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &PyArithmaticValue<T>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T> StructuralEq for PyArithmaticValue<T>

impl<T> StructuralPartialEq for PyArithmaticValue<T>

Auto Trait Implementations

impl<T> RefUnwindSafe for PyArithmaticValue<T> where
    T: RefUnwindSafe, 

impl<T> Send for PyArithmaticValue<T> where
    T: Send, 

impl<T> Sync for PyArithmaticValue<T> where
    T: Sync, 

impl<T> Unpin for PyArithmaticValue<T> where
    T: Unpin, 

impl<T> UnwindSafe for PyArithmaticValue<T> where
    T: UnwindSafe, 

Blanket Implementations

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

fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized, 
[src]

fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<!> for T[src]

fn from(t: !) -> T[src]

Performs the conversion.

impl<T> From<T> for T[src]

fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

fn into(self) -> U[src]

Performs the conversion.

impl<I> IntoIterator for I where
    I: Iterator, 
[src]

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]

Creates an iterator from a value. Read more

impl<T> IntoPyObject for T where
    T: PyValue, 
[src]

fn into_pyobject(
    Self,
    &VirtualMachine
) -> Result<Rc<PyObject<dyn PyObjectPayload + 'static>>, PyRef<PyBaseException>>
[src]

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>, 

fn min(self) -> f64

Returns the minimum value in the data Read more

fn max(self) -> f64

Returns the maximum value in the data Read more

fn abs_min(self) -> f64

Returns the minimum absolute value in the data Read more

fn abs_max(self) -> f64

Returns the maximum absolute value in the data Read more

fn mean(self) -> f64

Evaluates the sample mean, an estimate of the population mean. Read more

fn geometric_mean(self) -> f64

Evaluates the geometric mean of the data Read more

fn harmonic_mean(self) -> f64

Evaluates the harmonic mean of the data Read more

fn variance(self) -> f64

Estimates the unbiased population variance from the provided samples Read more

fn std_dev(self) -> f64

Estimates the unbiased population standard deviation from the provided samples Read more

fn population_variance(self) -> f64

Evaluates the population variance from a full population. Read more

fn population_std_dev(self) -> f64

Evaluates the population standard deviation from a full population. Read more

fn covariance(self, other: T) -> f64

Estimates the unbiased population covariance between the two provided samples Read more

fn population_covariance(self, other: T) -> f64

Evaluates the population covariance between the two provider populations Read more

fn quadratic_mean(self) -> f64

Estimates the quadratic mean (Root Mean Square) of the data Read more

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

fn to_owned(&self) -> T[src]

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

fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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]

Performs the conversion.

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

fn vzip(self) -> V

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.