Skip to main content

RuntimePluginApiV1

Struct RuntimePluginApiV1 

Source
#[repr(C)]
pub struct RuntimePluginApiV1 { pub abi_version: u32, pub plugin_name: unsafe extern "C" fn() -> RuntimeBytesRef, pub schema_bytes: unsafe extern "C" fn() -> RuntimeBytesRef, pub create_runtime: unsafe extern "C" fn(config: RuntimeBytesRef, out_runtime: *mut *mut c_void, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus, pub destroy_runtime: unsafe extern "C" fn(runtime: *mut c_void), pub run_tx: unsafe extern "C" fn(runtime: *mut c_void, host: RuntimeHostContextV1, command: RuntimeCommandView, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus, pub validate_biz_invariants: unsafe extern "C" fn(runtime: *mut c_void, host: RuntimeReadContextV1, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus, pub on_unload: unsafe extern "C" fn(runtime: *mut c_void, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus, }
Expand description

ABI function table returned by a runtime plugin entrypoint.

Fields§

§abi_version: u32

ABI version implemented by the plugin.

§plugin_name: unsafe extern "C" fn() -> RuntimeBytesRef

Returns the plugin name.

§schema_bytes: unsafe extern "C" fn() -> RuntimeBytesRef

Returns schema IDL JSON bytes.

§create_runtime: unsafe extern "C" fn(config: RuntimeBytesRef, out_runtime: *mut *mut c_void, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus

Creates a configured runtime plugin instance.

§destroy_runtime: unsafe extern "C" fn(runtime: *mut c_void)

Destroys a runtime plugin instance.

§run_tx: unsafe extern "C" fn(runtime: *mut c_void, host: RuntimeHostContextV1, command: RuntimeCommandView, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus

Runs one command transaction.

§validate_biz_invariants: unsafe extern "C" fn(runtime: *mut c_void, host: RuntimeReadContextV1, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus

Validates business invariants against read-only host state.

§on_unload: unsafe extern "C" fn(runtime: *mut c_void, out_error: *mut RuntimeErrorBuf) -> RuntimeCallStatus

Unloads a runtime plugin instance.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.