pub enum PluginResult {
Json {
name: String,
data: Vec<u8>,
},
Bytes {
name: String,
data: Vec<u8>,
},
File {
name: String,
path: PathBuf,
},
}Expand description
A named result produced by plugin analysis.
Each variant carries a name that identifies the result in the task
report (e.g. "yara_matches", "extracted_pe").
Variants§
Json
Structured data serialized as JSON.
Bytes
Arbitrary binary data.
File
A file on disk - the runtime streams it back to the daemon.
Implementations§
Source§impl PluginResult
impl PluginResult
Sourcepub fn json(name: impl Into<String>, value: &impl Serialize) -> Result<Self>
pub fn json(name: impl Into<String>, value: &impl Serialize) -> Result<Self>
Serialize a value as JSON and wrap it as a named result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginResult
impl RefUnwindSafe for PluginResult
impl Send for PluginResult
impl Sync for PluginResult
impl Unpin for PluginResult
impl UnsafeUnpin for PluginResult
impl UnwindSafe for PluginResult
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].