Trait Symbol

Source
pub trait Symbol<T> {
    // Required method
    unsafe fn get(&self) -> T;
}
Expand description

A symbol from a shared library.

Required Methods§

Source

unsafe fn get(&self) -> T

Provides access to the data that this symbol references.

§Unsafety

If the data that this symbol references contains pointers to other things in the shared library, and T: Clone, we can obtain a clone of the data and use it to outlast the library. To prevent this, the return of this function should never be cloned.

Implementors§

Source§

impl<'a, T> Symbol<&'a T> for Data<'a, T>

Source§

impl<'a, T> Symbol<&'a T> for DataUnsafe<T>

Source§

impl<'a, T> Symbol<T> for Func<'a, T>
where T: Copy,

Source§

impl<'a, T, TLib> Symbol<&'a T> for DataTracked<T, TLib>

Source§

impl<T> Symbol<T> for FuncUnsafe<T>
where T: Copy,

Source§

impl<T, TLib> Symbol<T> for FuncTracked<T, TLib>
where T: Copy,