pub struct PluginCustomDataValue { /* private fields */ }Expand description
Host-side trait-object adapter for a plug-in custom-data value.
Holds an opaque handle plus a pointer to the plug-in’s vtable; every
trait call is routed through the vtable so the host never needs to know
the plug-in’s concrete type. Dropping the wrapper invokes the plug-in’s
drop_handle thunk so the cdylib’s allocator owns the value.
Implementations§
Source§impl PluginCustomDataValue
impl PluginCustomDataValue
Sourcepub fn boundary_ref(&self) -> PluginCustomDataRef
pub fn boundary_ref(&self) -> PluginCustomDataRef
Returns the boundary reference used for plug-in on_data callbacks.
Trait Implementations§
Source§impl CustomDataTrait for PluginCustomDataValue
impl CustomDataTrait for PluginCustomDataValue
Source§fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
fn clone_arc(&self) -> Arc<dyn CustomDataTrait>
Returns a cloned Arc of the custom data.
Source§fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
Returns whether the custom data is equal to another.
Source§fn to_json_py(&self) -> Result<String, Error>
fn to_json_py(&self) -> Result<String, Error>
Python-facing JSON serialization. Default implementation forwards to
to_json.
Override if a different behavior is needed for the Python API. Read moreSource§fn type_name_static() -> &'static strwhere
Self: Sized,
fn type_name_static() -> &'static strwhere
Self: Sized,
Returns the type name used in serialized form (e.g. in the
"type" field).Source§impl Debug for PluginCustomDataValue
impl Debug for PluginCustomDataValue
Source§impl Drop for PluginCustomDataValue
impl Drop for PluginCustomDataValue
Source§impl HasTsInit for PluginCustomDataValue
impl HasTsInit for PluginCustomDataValue
impl Send for PluginCustomDataValue
impl Sync for PluginCustomDataValue
SAFETY: see above.
Auto Trait Implementations§
impl Freeze for PluginCustomDataValue
impl RefUnwindSafe for PluginCustomDataValue
impl Unpin for PluginCustomDataValue
impl UnsafeUnpin for PluginCustomDataValue
impl UnwindSafe for PluginCustomDataValue
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