pub struct RuntimeManager { /* private fields */ }Implementations§
Source§impl RuntimeManager
impl RuntimeManager
Sourcepub fn new(client: Arc<Client>) -> Self
pub fn new(client: Arc<Client>) -> Self
RuntimeManager is the native-only extension seam for advanced protocol composition.
Allowed:
- own protocol plugin registration
- add ALPNs before endpoint bind
- notify plugins when the runtime endpoint is ready or adopted
Not allowed:
- become a second peer-session lifecycle engine
- define app payload semantics
Source of truth:
Clientowns peer sessions, discovery, signaling, and settled readinessProtocolRegistryowns plugin declarations and runtime-ready callbacks
pub fn with_registry( client: Arc<Client>, protocol_registry: Arc<ProtocolRegistry>, ) -> Self
pub fn protocol_registry(&self) -> Arc<ProtocolRegistry> ⓘ
pub fn client(&self) -> Arc<Client> ⓘ
pub async fn register_protocol( &self, plugin: Arc<dyn ProtocolPlugin>, ) -> Result<()>
pub async fn register_session_plugin( &self, plugin: Arc<dyn ProtocolPlugin>, ) -> Result<()>
pub async fn register_alpn_protocol( &self, plugin: Arc<dyn ProtocolPlugin>, ) -> Result<()>
pub async fn unregister_protocol(&self, name: &str)
pub async fn protocol_descriptors(&self) -> Vec<ProtocolPluginDescriptor>
pub async fn apply_registered_protocols( &self, builder: RouterBuilder, ) -> Result<RouterBuilder>
pub async fn init_runtime(&self, secret_key: Option<Vec<u8>>) -> Result<String>
pub async fn adopt_endpoint(&self, endpoint: Endpoint) -> Result<String>
pub async fn current_node_id(&self) -> Option<String>
pub async fn get_endpoint(&self) -> Result<Endpoint>
pub async fn export_endpoint_handle(&self) -> Result<EndpointHandle>
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeManager
impl !UnwindSafe for RuntimeManager
impl Freeze for RuntimeManager
impl Send for RuntimeManager
impl Sync for RuntimeManager
impl Unpin for RuntimeManager
impl UnsafeUnpin for RuntimeManager
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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