#[repr(C)]pub struct RegisterComponentLibraryFn {
pub cb: extern "C" fn() -> ComponentLibrary,
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: extern "C" fn() -> ComponentLibrary§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§fn clone(&self) -> RegisterComponentLibraryFn
fn clone(&self) -> RegisterComponentLibraryFn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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: extern "C" fn() -> ComponentLibrary) -> RegisterComponentLibraryFn
fn from(cb: extern "C" fn() -> ComponentLibrary) -> RegisterComponentLibraryFn
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
Source§fn cmp(&self, other: &RegisterComponentLibraryFn) -> Ordering
fn cmp(&self, other: &RegisterComponentLibraryFn) -> Ordering
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 PartialEq for RegisterComponentLibraryFn
impl PartialEq for RegisterComponentLibraryFn
Source§fn eq(&self, rhs: &RegisterComponentLibraryFn) -> bool
fn eq(&self, rhs: &RegisterComponentLibraryFn) -> bool
Tests for
self and other values to be equal, and is used by ==.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more