Enum candle_core::pickle::Object
source · 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§
source§impl PartialEq for Object
impl PartialEq for Object
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