pub enum TreeDef {
Leaf,
None,
Tuple(Vec<TreeDef>),
List(Vec<TreeDef>),
Struct {
name: String,
fields: Vec<String>,
children: Vec<TreeDef>,
},
}Expand description
A description of a pytree’s structure, for writing it out to other languages (the field names of structs, for example).
Variants§
Leaf
A leaf (a scalar or an array).
None
No leaves (()).
Tuple(Vec<TreeDef>)
A tuple.
List(Vec<TreeDef>)
A list (Vec or a Rust array).
Struct
A struct with named fields.
Implementations§
Trait Implementations§
impl Eq for TreeDef
impl StructuralPartialEq for TreeDef
Auto Trait Implementations§
impl Freeze for TreeDef
impl RefUnwindSafe for TreeDef
impl Send for TreeDef
impl Sync for TreeDef
impl Unpin for TreeDef
impl UnsafeUnpin for TreeDef
impl UnwindSafe for TreeDef
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