pub enum BuiltInProcess {
Debug(DebugProcessNode),
Script(ScriptProcessNode),
Template(TemplateProcessNode),
Qa(QAProcessNode),
Plugin {
name: String,
path: PathBuf,
},
}Expand description
An enum of all built-in variants plus a “Plugin” marker for any external WASM on disk.
When you load a .wasm plugin from /plugins/foo.wasm, you will spawn a
BuiltInProcess::Plugin { name: "foo".into(), path: "/plugins/foo.wasm".into() }.
Variants§
Debug(DebugProcessNode)
A baked-in “debug” process
Script(ScriptProcessNode)
A baked-in script process (for example, a Rhia script)
Template(TemplateProcessNode)
A baked-in Handlebars template process
Qa(QAProcessNode)
A Question & Answer process with optional agent support
Plugin
A disk-loaded plugin (e.g. /plugins/foo.wasm → name = “foo”).
Implementations§
Source§impl BuiltInProcess
impl BuiltInProcess
Sourcepub fn process_name(&self) -> String
pub fn process_name(&self) -> String
Return the key under which this should be registered.
- For a baked-in variant, forward to its
process_name(). - For
Plugin { name, .. }, return thatname.
pub async fn process( &self, msg: Message, ctx: &mut NodeContext, ) -> Result<NodeOut, NodeErr>
Sourcepub fn plugin_path(&self) -> Option<&PathBuf>
pub fn plugin_path(&self) -> Option<&PathBuf>
If this is a Plugin { path, .. }, return Some(&path). Otherwise None.
Trait Implementations§
Source§impl Clone for BuiltInProcess
impl Clone for BuiltInProcess
Source§fn clone(&self) -> BuiltInProcess
fn clone(&self) -> BuiltInProcess
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuiltInProcess
impl Debug for BuiltInProcess
Source§impl<'de> Deserialize<'de> for BuiltInProcess
impl<'de> Deserialize<'de> for BuiltInProcess
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
Source§impl JsonSchema for BuiltInProcess
impl JsonSchema for BuiltInProcess
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for BuiltInProcess
impl PartialEq for BuiltInProcess
Source§fn eq(&self, other: &BuiltInProcess) -> bool
fn eq(&self, other: &BuiltInProcess) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BuiltInProcess
impl Serialize for BuiltInProcess
impl StructuralPartialEq for BuiltInProcess
Auto Trait Implementations§
impl Freeze for BuiltInProcess
impl !RefUnwindSafe for BuiltInProcess
impl Send for BuiltInProcess
impl Sync for BuiltInProcess
impl Unpin for BuiltInProcess
impl UnsafeUnpin for BuiltInProcess
impl UnwindSafe for BuiltInProcess
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request