pub struct Plugin {
pub manifest: PluginManifest,
pub plugin_dir: String,
pub js_content: Vec<u8>,
pub wasm_content: Vec<u8>,
pub data_content: Option<Vec<u8>>,
pub ldt_content: Option<Vec<u8>>,
}Expand description
A discovered plugin with its manifest and file contents.
Fields§
§manifest: PluginManifestPlugin manifest
plugin_dir: StringDirectory path within GLDF (e.g., “other/viewer/starsky”)
js_content: Vec<u8>JavaScript file content
wasm_content: Vec<u8>WASM binary content
data_content: Option<Vec<u8>>Optional data file content (if data_file is specified and exists)
ldt_content: Option<Vec<u8>>Optional LDT file content (if ldt_file is specified and exists)
Implementations§
Source§impl Plugin
impl Plugin
Sourcepub fn js_as_string(&self) -> Result<String, FromUtf8Error>
pub fn js_as_string(&self) -> Result<String, FromUtf8Error>
Get the JS content as a string
Sourcepub fn data_as_string(&self) -> Option<Result<String, FromUtf8Error>>
pub fn data_as_string(&self) -> Option<Result<String, FromUtf8Error>>
Get the data content as a string (for JSON data)
Trait Implementations§
impl StructuralPartialEq for Plugin
Auto Trait Implementations§
impl Freeze for Plugin
impl RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnsafeUnpin for Plugin
impl UnwindSafe for Plugin
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