pub struct Arbor<P: HubContext = NoParent> { /* private fields */ }Expand description
Arbor activation - manages conversation trees
Generic over P: HubContext to support parent context injection for
resolving handles when rendering trees.
Implementations§
Source§impl<P: HubContext> Arbor<P>
impl<P: HubContext> Arbor<P>
Sourcepub async fn with_context_type(config: ArborConfig) -> Result<Self, String>
pub async fn with_context_type(config: ArborConfig) -> Result<Self, String>
Create a new Arbor activation with its own storage and specific context type
Sourcepub fn with_storage(storage: Arc<ArborStorage>) -> Self
pub fn with_storage(storage: Arc<ArborStorage>) -> Self
Create an Arbor activation with a shared storage instance
Sourcepub fn storage(&self) -> Arc<ArborStorage>
pub fn storage(&self) -> Arc<ArborStorage>
Get the underlying storage (for sharing with other activations)
Sourcepub fn inject_parent(&self, parent: P)
pub fn inject_parent(&self, parent: P)
Inject parent context for resolving handles
Called during hub construction (e.g., via Arc::new_cyclic for DynamicHub).
Sourcepub fn has_parent(&self) -> bool
pub fn has_parent(&self) -> bool
Check if parent context has been injected
Trait Implementations§
Source§impl<P: HubContext> Activation for Arbor<P>
impl<P: HubContext> Activation for Arbor<P>
type Methods = ArborMethod
fn namespace(&self) -> &str
fn version(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Short description (max 15 words)
Source§fn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
Long description (optional, for detailed documentation)
fn methods(&self) -> Vec<&str>
fn method_help(&self, method: &str) -> Option<String>
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn into_rpc_methods(self) -> Methods
Source§fn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Return this activation’s schema (methods + optional children)
Source§fn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
Stable activation instance ID for handle routing
By default generates a deterministic UUID from namespace+major_version
Using major version only ensures handles survive minor/patch upgrades (semver)
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl<P> Freeze for Arbor<P>
impl<P = NoParent> !RefUnwindSafe for Arbor<P>
impl<P> Send for Arbor<P>
impl<P> Sync for Arbor<P>
impl<P> Unpin for Arbor<P>where
P: Unpin,
impl<P = NoParent> !UnwindSafe for Arbor<P>
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> 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 more