Skip to main content

Crate plexus_core

Crate plexus_core 

Source
Expand description

Hub Core - Core infrastructure for building Plexus RPC servers

This crate provides:

  • DynamicHub - Dynamic routing hub for activations (implements Plexus RPC protocol)
  • Activation - Trait for implementing activations
  • Handle - Typed references to activation method results

§Example

use plexus_core::plexus::DynamicHub;
use plexus_core::activations::echo::EchoActivation;
use plexus_core::activations::health::Health;
use std::sync::Arc;

let hub = Arc::new(
    DynamicHub::new("myapp")
        .register(Health::new())
        .register(EchoActivation::new())
);

Re-exports§

pub use builder::build_example_hub;
pub use plexus::Activation;
pub use plexus::AuthzDenyReason;
pub use plexus::Cardinality;
pub use plexus::ChildCapabilities;Deprecated
pub use plexus::ChildRouter;
pub use plexus::DeprecationInfo;
pub use plexus::DynamicHub;
pub use plexus::MethodRole;
pub use plexus::PlexusError;
pub use plexus::PLEXUS_NOTIF_METHOD;
pub use types::Envelope;
pub use types::Handle;
pub use types::HandleParseError;
pub use types::HandleResolutionParams;
pub use types::Origin;

Modules§

activations
Example activations demonstrating plexus-macros usage
builder
Example DynamicHub builder
call
RETURNS-47 · the call’s context: who is calling, as the gate admitted them, how far the call reaches, and the hop it came through.
plexus
plugin_system
request
Raw HTTP request context and extraction trait for Plexus request extraction.
serde_helpers
Serde helper utilities for consistent deserialization behavior
types
Substrate-level core types

Constants§

VERSION
Crate version, populated at compile time from CARGO_PKG_VERSION.

Attribute Macros§

activation
Attribute macro for impl blocks defining a Plexus activation.
hub_method
Deprecated: use plexus::method instead.
hub_methods
Deprecated: use plexus::activation instead.
method
Attribute macro for individual methods within a #[plexus::activation] impl block.