pub struct TypeEntry {
pub type_id: TypeId,
pub type_name: &'static str,
pub push_arg_fn: PushArgFn,
pub add_cell_fn: AddCellFn,
pub add_source_fn: AddSourceFn,
pub call_dyn_fn: CallDynFn,
pub eq_dyn_fn: fn(&dyn Any, &dyn Any) -> bool,
pub default_fn: Option<fn() -> Box<dyn Any>>,
pub add_conditional_fn: AddConditionalFn,
pub value_type_fn: fn() -> ValueType,
/* private fields */
}Expand description
Metadata for a single type registered in a TypeRegistry.
Fields§
§type_id: TypeIdRuntime type identity.
type_name: &'static strRust type name for error messages.
push_arg_fn: PushArgFnRegisters a push_arg<T> op at the given argument index.
add_cell_fn: AddCellFnCreates a sheet cell from a Box<dyn Any> holding a T.
add_source_fn: AddSourceFnCreates a source-kind sheet cell (via [Sheet::add_source]) from a Box<dyn Any> holding
a T.
call_dyn_fn: CallDynFnCalls DynSegment::call_dyn::<T> and boxes the result.
eq_dyn_fn: fn(&dyn Any, &dyn Any) -> boolCompares two type-erased values of this type for equality.
default_fn: Option<fn() -> Box<dyn Any>>Constructs a default T if the type implements Default; otherwise None.
add_conditional_fn: AddConditionalFnCalls Sheet::add_conditional::<T> with type-erased branch keys.
value_type_fn: fn() -> ValueTypeBuilds complete concrete leaf metadata with the registered capabilities.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeEntry
impl RefUnwindSafe for TypeEntry
impl Send for TypeEntry
impl Sync for TypeEntry
impl Unpin for TypeEntry
impl UnsafeUnpin for TypeEntry
impl UnwindSafe for TypeEntry
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