pub struct Behavior {
pub id: String,
pub wasm: String,
pub weft: Option<String>,
pub weft_pack: Option<String>,
pub weft_export: Option<String>,
pub on: Vec<String>,
}Expand description
A sandboxed WASM behavior module the world runs.
Fields§
§id: String§wasm: StringThe id of a WASM Asset (the polyglot floor — Behavior ABI v0.1).
weft: Option<String>The id of a Weft Asset — the Thread’s native code (weft-v0.1):
a content-addressed, verified module. Exactly one of wasm/weft.
weft_pack: Option<String>The id of a Weft package Asset (.weftpack.json, weft-pack-v0.1)
— bind a published package’s export as this behavior. Use with
weft_export; the browser fetches, verifies, and
links locally. The markup form is weft-use="<uri>#<export>".
weft_export: Option<String>The package export (petname) that is this behavior’s entry.
on: Vec<String>Event names this module handles (e.g. interact, tick).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Behavior
impl<'de> Deserialize<'de> for Behavior
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Behavior
impl RefUnwindSafe for Behavior
impl Send for Behavior
impl Sync for Behavior
impl Unpin for Behavior
impl UnsafeUnpin for Behavior
impl UnwindSafe for Behavior
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