#[repr(C)]pub struct RegisterComponentLibraryFn {
pub cb: RegisterComponentLibraryFnType,
pub ctx: OptionRefAny,
}Expand description
Callback struct for registering entire component libraries at startup.
In C: pass a bare extern "C" fn() -> ComponentLibrary function pointer —
it converts automatically via From<RegisterComponentLibraryFnType>.
In Python: construct this struct with cb set to a trampoline and
ctx set to Some(RefAny(...)) wrapping the Python callable.
Fields§
§cb: RegisterComponentLibraryFnType§ctx: OptionRefAnyFor FFI: stores the foreign callable (e.g., PyFunction). Native Rust/C code sets this to None.
Trait Implementations§
Source§impl Clone for RegisterComponentLibraryFn
impl Clone for RegisterComponentLibraryFn
Source§impl Debug for RegisterComponentLibraryFn
impl Debug for RegisterComponentLibraryFn
Source§impl Display for RegisterComponentLibraryFn
impl Display for RegisterComponentLibraryFn
Source§impl From<extern "C" fn() -> ComponentLibrary> for RegisterComponentLibraryFn
Allow creating callback from a raw function pointer
Sets callable to None (for native Rust/C usage)
impl From<extern "C" fn() -> ComponentLibrary> for RegisterComponentLibraryFn
Allow creating callback from a raw function pointer Sets callable to None (for native Rust/C usage)
Source§fn from(cb: RegisterComponentLibraryFnType) -> Self
fn from(cb: RegisterComponentLibraryFnType) -> Self
Converts to this type from the input type.
Source§impl Hash for RegisterComponentLibraryFn
impl Hash for RegisterComponentLibraryFn
Source§impl Ord for RegisterComponentLibraryFn
impl Ord for RegisterComponentLibraryFn
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for RegisterComponentLibraryFn
impl PartialOrd for RegisterComponentLibraryFn
impl Eq for RegisterComponentLibraryFn
Auto Trait Implementations§
impl Freeze for RegisterComponentLibraryFn
impl RefUnwindSafe for RegisterComponentLibraryFn
impl Send for RegisterComponentLibraryFn
impl Sync for RegisterComponentLibraryFn
impl Unpin for RegisterComponentLibraryFn
impl UnsafeUnpin for RegisterComponentLibraryFn
impl UnwindSafe for RegisterComponentLibraryFn
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