pub unsafe trait EntryProvider:
Send
+ Sync
+ 'static {
// Required method
fn entry_pointer(&self) -> NonNull<EntryDescriptor>;
}Expand description
A type which can provide an entry descriptor pointer for Clack hosts to load.
§Safety
Implementors must ensure the EntryDescriptor returned by the entry_pointer method
remains valid for the entire lifetime of this type. That means all the function pointers it contains
must remain valid to call.
Moreover, the returned EntryDescriptor must have a stable address. It must not move for the
lifetime of this type.
Required Methods§
Sourcefn entry_pointer(&self) -> NonNull<EntryDescriptor>
fn entry_pointer(&self) -> NonNull<EntryDescriptor>
Returns a pointer to the EntryDescriptor this provides.
This pointer always valid for reads, as long as this type is alive. This pointer is also stable, i.e. its address will never change for the entire duration of this type’s lifetime.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl EntryProvider for Arc<EntryDescriptor>
impl EntryProvider for Arc<EntryDescriptor>
fn entry_pointer(&self) -> NonNull<EntryDescriptor>
Source§impl EntryProvider for Box<EntryDescriptor>
impl EntryProvider for Box<EntryDescriptor>
fn entry_pointer(&self) -> NonNull<EntryDescriptor>
Implementors§
impl EntryProvider for &'static EntryDescriptor
impl EntryProvider for LibraryEntry
Available on crate feature
libloading only.