pub struct PluginAdminRouter { /* private fields */ }Expand description
Longest-prefix-first matcher with interior mutability so the
daemon can construct an empty router at admin-bootstrap time
and populate it AFTER wire_plugin_registry returns the
plugin handles.
Implementations§
Source§impl PluginAdminRouter
impl PluginAdminRouter
pub fn new() -> Self
Sourcepub fn register(
&self,
plugin_id: &str,
method_prefix: &str,
broker_topic_prefix: &str,
timeout: Option<Duration>,
) -> Result<(), AdminRouteRegistrationError>
pub fn register( &self, plugin_id: &str, method_prefix: &str, broker_topic_prefix: &str, timeout: Option<Duration>, ) -> Result<(), AdminRouteRegistrationError>
Register a plugin’s admin prefix. Rejects registrations
colliding with RESERVED_ADMIN_PREFIXES. Duplicate
plugin_id overrides previous entries (hot-spawn restart).
Sourcepub fn match_method(&self, method: &str) -> Option<MatchInfo>
pub fn match_method(&self, method: &str) -> Option<MatchInfo>
Match an admin method against registered prefixes.
Returns the dispatch metadata needed by
forward_request. The returned MatchInfo is owned
(not borrowing the router) so the caller can drop the
router lock immediately.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for PluginAdminRouter
impl Debug for PluginAdminRouter
Source§impl Default for PluginAdminRouter
impl Default for PluginAdminRouter
Source§fn default() -> PluginAdminRouter
fn default() -> PluginAdminRouter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for PluginAdminRouter
impl RefUnwindSafe for PluginAdminRouter
impl Send for PluginAdminRouter
impl Sync for PluginAdminRouter
impl Unpin for PluginAdminRouter
impl UnsafeUnpin for PluginAdminRouter
impl UnwindSafe for PluginAdminRouter
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> 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