pub type ConnectorDescriptor = PluginDescriptor<LoadableConnector>;

Aliased Type§

struct ConnectorDescriptor {
    pub plugin_version: i32,
    pub accept_input: bool,
    pub input_layout: &'static TypeLayout,
    pub output_layout: &'static TypeLayout,
    pub name: CSliceRef<'static, u8>,
    pub version: CSliceRef<'static, u8>,
    pub description: CSliceRef<'static, u8>,
    pub help_callback: Option<extern "C" fn(_: OpaqueCallback<'_, ReprCString>)>,
    pub target_list_callback: Option<extern "C" fn(_: OpaqueCallback<'_, TargetInfo>) -> i32>,
    pub create: extern "C" fn(_: Option<&ConnectorArgs>, _: COption<OsInstance<'static, CBox<'static, c_void>, CArc<c_void>>>, _: CArc<c_void>, _: Option<&'static PluginLogger>, _: &mut MaybeUninit<ConnectorInstance<'static, CBox<'static, c_void>, CArc<c_void>>>) -> i32,
}

Fields§

§plugin_version: i32

The plugin api version for when the plugin was built. This has to be set to MEMFLOW_PLUGIN_VERSION of memflow.

If the versions mismatch the inventory will refuse to load.

§accept_input: bool

Does the plugin accept an input parameter?

§input_layout: &'static TypeLayout

Layout of the input type.

§output_layout: &'static TypeLayout

Layout of the loaded type.

§name: CSliceRef<'static, u8>

The name of the plugin. This name will be used when loading a plugin from the inventory.

During plugin discovery, the export suffix has to match this name being capitalized

§version: CSliceRef<'static, u8>

The version of the connector. If multiple connectors are installed the latest is picked.

§description: CSliceRef<'static, u8>

The description of the connector.

§help_callback: Option<extern "C" fn(_: OpaqueCallback<'_, ReprCString>)>

Retrieves a help string from the plugin (lists all available commands)

§target_list_callback: Option<extern "C" fn(_: OpaqueCallback<'_, TargetInfo>) -> i32>

Retrieves a list of available targets for the plugin

§create: extern "C" fn(_: Option<&ConnectorArgs>, _: COption<OsInstance<'static, CBox<'static, c_void>, CArc<c_void>>>, _: CArc<c_void>, _: Option<&'static PluginLogger>, _: &mut MaybeUninit<ConnectorInstance<'static, CBox<'static, c_void>, CArc<c_void>>>) -> i32

Create instance of the plugin