pub struct WasmPluginSlot {
pub name: &'static str,
pub framework: FrameworkId,
pub mode: PluginMode,
pub contract: FlowContract,
pub channels: &'static [ValidationChannel],
}Expand description
A release-time opening for one Wasm extension or replacement. 正式发布时保留的一个 Wasm 扩展或替换入口。
Fields§
§name: &'static strSlot name, unique within one table and used to address installs and calls. 槽名,在单个表内唯一,用于寻址安装与调用。
framework: FrameworkIdFramework whose artifacts this slot admits. 该槽接纳的 framework。
mode: PluginModeWhether the plugin extends or replaces the framework. 插件是扩展还是替换该 framework。
contract: FlowContractFlow contract the artifact must match before activation. 激活前工件必须匹配的数据流合同。
channels: &'static [ValidationChannel]Trust lanes allowed to install into this slot; must be non-empty. 允许安装进该槽的信任通道;不得为空。
Implementations§
Source§impl WasmPluginSlot
impl WasmPluginSlot
Sourcepub const fn new(
name: &'static str,
framework: FrameworkId,
mode: PluginMode,
contract: FlowContract,
channels: &'static [ValidationChannel],
) -> Self
pub const fn new( name: &'static str, framework: FrameworkId, mode: PluginMode, contract: FlowContract, channels: &'static [ValidationChannel], ) -> Self
Build a slot definition; const so tables can live in static storage.
构造槽定义;为 const,便于把表放在静态存储中。
Trait Implementations§
Source§impl Clone for WasmPluginSlot
impl Clone for WasmPluginSlot
impl Copy for WasmPluginSlot
Auto Trait Implementations§
impl Freeze for WasmPluginSlot
impl RefUnwindSafe for WasmPluginSlot
impl Send for WasmPluginSlot
impl Sync for WasmPluginSlot
impl Unpin for WasmPluginSlot
impl UnsafeUnpin for WasmPluginSlot
impl UnwindSafe for WasmPluginSlot
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