[][src]Enum py_marshal::Obj

pub enum Obj {
    None,
    StopIteration,
    Ellipsis,
    Bool(bool),
    Long(Arc<BigInt>),
    Float(f64),
    Complex(Complex<f64>),
    Bytes(Arc<Vec<u8>>),
    String(Arc<String>),
    Tuple(Arc<Vec<Obj>>),
    List(ArcRwLock<Vec<Obj>>),
    Dict(ArcRwLock<HashMap<ObjHashable, Obj>>),
    Set(ArcRwLock<HashSet<ObjHashable>>),
    FrozenSet(Arc<HashSet<ObjHashable>>),
    Code(Arc<Code>),
}

Variants

None
StopIteration
Ellipsis
Bool(bool)
Long(Arc<BigInt>)
Float(f64)
Complex(Complex<f64>)
Bytes(Arc<Vec<u8>>)
String(Arc<String>)
Tuple(Arc<Vec<Obj>>)
List(ArcRwLock<Vec<Obj>>)
FrozenSet(Arc<HashSet<ObjHashable>>)
Code(Arc<Code>)

Methods

impl Obj[src]

pub fn extract_none(&self) -> Result<(), &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_stop_iteration(&self) -> Result<(), &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_bool(&self) -> Result<bool, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_long(&self) -> Result<Arc<BigInt>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_float(&self) -> Result<f64, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_bytes(&self) -> Result<Arc<Vec<u8>>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_string(&self) -> Result<Arc<String>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_tuple(&self) -> Result<Arc<Vec<Self>>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_list(&self) -> Result<ArcRwLock<Vec<Self>>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_dict(
    &self
) -> Result<ArcRwLock<HashMap<ObjHashable, Self>>, &Self>
[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_set(&self) -> Result<ArcRwLock<HashSet<ObjHashable>>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_frozenset(&self) -> Result<Arc<HashSet<ObjHashable>>, &Self>[src]

Errors

Returns a reference to self if extraction fails

pub fn extract_code(&self) -> Result<Arc<Code>, &Self>[src]

Errors

Returns a reference to self if extraction fails

Trait Implementations

impl Clone for Obj[src]

impl Debug for Obj[src]

impl<'_> TryFrom<&'_ Obj> for ObjHashable[src]

type Error = Obj

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Obj

impl Send for Obj

impl Sync for Obj

impl Unpin for Obj

impl UnwindSafe for Obj

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.