pub enum Object {
Show 13 variants
Class {
module_name: String,
class_name: String,
},
Int(i32),
Float(f64),
Unicode(String),
Bool(bool),
None,
Tuple(Vec<Object>),
List(Vec<Object>),
Mark,
Dict(Vec<(Object, Object)>),
Reduce {
callable: Box<Object>,
args: Box<Object>,
},
Build {
callable: Box<Object>,
args: Box<Object>,
},
PersistentLoad(Box<Object>),
}
Variants§
Class
Int(i32)
Float(f64)
Unicode(String)
Bool(bool)
None
Tuple(Vec<Object>)
List(Vec<Object>)
Mark
Dict(Vec<(Object, Object)>)
Reduce
Build
PersistentLoad(Box<Object>)
Implementations§
Source§impl Object
impl Object
pub fn unicode(self) -> Result<String, Object>
pub fn reduce(self) -> Result<(Self, Self), Object>
pub fn none(self) -> Result<(), Object>
pub fn persistent_load(self) -> Result<Self, Object>
pub fn bool(self) -> Result<bool, Object>
pub fn int(self) -> Result<i32, Object>
pub fn tuple(self) -> Result<Vec<Self>, Object>
pub fn dict(self) -> Result<Vec<(Self, Self)>, Object>
pub fn class(self) -> Result<(String, String), Object>
pub fn into_tensor_info( self, name: Self, dir_name: &Path, ) -> Result<Option<TensorInfo>>
Trait Implementations§
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more