pub struct ConfigKeyActivation { /* private fields */ }Expand description
One node of the key tree: a setting (transport.insecure_ws) or a group
of them (transport).
Implementations§
Source§impl ConfigKeyActivation
A setting (or a group of them).
impl ConfigKeyActivation
A setting (or a group of them).
Sourcepub async fn get(&self) -> SettingEvent
pub async fn get(&self) -> SettingEvent
The setting as it stands: its value (a secret’s hash only), where it comes from, its default, how it reloads, its type’s schema.
Sourcepub async fn set(
&self,
auth: Option<&AuthContext>,
value: Value,
confirm_within: Option<String>,
) -> SettingEvent
pub async fn set( &self, auth: Option<&AuthContext>, value: Value, confirm_within: Option<String>, ) -> SettingEvent
Set it at runtime. value in the setting’s type (a string is read
as JSON when it does not fit as text: --value true).
confirm_within (60s): applied at once, reverted unless
confirm comes in time — so a change that cuts the caller off undoes
itself.
Sourcepub async fn reset(&self, auth: Option<&AuthContext>) -> SettingEvent
pub async fn reset(&self, auth: Option<&AuthContext>) -> SettingEvent
Take its runtime value away: back to the flag’s, the file’s or the default.
Sourcepub async fn confirm(&self, auth: Option<&AuthContext>) -> SettingEvent
pub async fn confirm(&self, auth: Option<&AuthContext>) -> SettingEvent
Keep the change made with confirm_within.
Source§impl ConfigKeyActivation
impl ConfigKeyActivation
pub const NAMESPACE: &'static str = "config_key"
Sourcepub fn plugin_children(&self) -> Vec<ChildSummary>
pub fn plugin_children(&self) -> Vec<ChildSummary>
Auto-generated child summary list from #[plexus_macros::child]
static methods, each with its child’s schema hash. Dynamic
children are not listed here; they are enumerable at runtime
via ChildRouter::list_children.
Trait Implementations§
Source§impl Activation for ConfigKeyActivation
impl Activation for ConfigKeyActivation
type Methods = ConfigKeyActivationMethod
fn namespace(&self) -> &str
fn version(&self) -> &str
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn long_description(&self) -> Option<&str>
fn long_description(&self) -> Option<&str>
fn methods(&self) -> Vec<&str>
fn method_help(&self, method: &str) -> Option<String>
fn call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn into_rpc_methods(self) -> Methods
Source§fn plugin_schema(&self) -> PluginSchema
fn plugin_schema(&self) -> PluginSchema
Source§fn slot_schema() -> Option<PluginSchema>where
Self: Sized,
fn slot_schema() -> Option<PluginSchema>where
Self: Sized,
#[child] publishes as its slot’s type
(MethodRole::DynamicChild { child }). None (the default) for an
activation the macro did not write; #[plexus_macros::activation]
emits it (its static namespace, version, description, methods and
roles).Source§fn plugin_id(&self) -> Uuid
fn plugin_id(&self) -> Uuid
fn resolve_handle<'life0, 'life1, 'async_trait>(
&'life0 self,
_handle: &'life1 Handle,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
fn static_child_schemas(&self) -> Vec<(String, PluginSchema)>
(path, schema) — the same list as
ChildRouter::router_static_child_schemas, reachable from the
hub’s type-erased registry (which holds Activations). Read moreSource§impl ChildRouter for ConfigKeyActivation
impl ChildRouter for ConfigKeyActivation
Source§fn router_namespace(&self) -> &str
fn router_namespace(&self) -> &str
Source§fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn router_call<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
raw_ctx: Option<&'life3 RawRequestContext>,
) -> Pin<Box<dyn Future<Output = Result<PlexusStream, PlexusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_child<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn ChildRouter>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn capabilities(&self) -> ChildCapabilities
fn capabilities(&self) -> ChildCapabilities
Source§fn list_children<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'_, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_children<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'_, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn forward_policy_for(&self, callee_ns: &str) -> Option<Arc<dyn ForwardPolicy>>
fn forward_policy_for(&self, callee_ns: &str) -> Option<Arc<dyn ForwardPolicy>>
Source§fn router_schema(&self) -> Option<PluginSchema>
fn router_schema(&self) -> Option<PluginSchema>
Source§fn peer_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ChildRouter>>, PeerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn peer_child<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn ChildRouter>>, PeerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
name, or why a peer could not be
returned — what routing asks, so a caller gets a typed error item
(not_grafted, unavailable, shape_mismatch, …), never “not
found”, for a peer that failed. Default: Self::get_child, which
cannot fail. #[plexus_macros::activation] overrides it for an
activation with a #[plexus_macros::peer] slot.Source§fn search_children<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'_, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_children<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'_, String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn router_static_child_schemas(&self) -> Vec<(String, PluginSchema)>
fn router_static_child_schemas(&self) -> Vec<(String, PluginSchema)>
(path, schema) — path relative to this router, dotted for a
grandchild ("commits", "commits.audit"), schema the child’s own
(its methods’ grants and its roles relative to it, as its macro
wrote them). Read moreSource§fn framework_stamped_principal(&self) -> Principal
fn framework_stamped_principal(&self) -> Principal
plexus_auth_core::Principal of
this router. Read moreSource§impl Clone for ConfigKeyActivation
impl Clone for ConfigKeyActivation
impl HasClient for ConfigKeyActivation
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigKeyActivation
impl !UnwindSafe for ConfigKeyActivation
impl Forget for ConfigKeyActivation
impl Freeze for ConfigKeyActivation
impl Send for ConfigKeyActivation
impl Sync for ConfigKeyActivation
impl Unpin for ConfigKeyActivation
impl UnsafeUnpin for ConfigKeyActivation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSendSync for T
Source§impl<T> Peer for Twhere
T: Activation + ChildRouter,
impl<T> Peer for Twhere
T: Activation + ChildRouter,
Source§fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
params: Value,
auth: Option<&'life2 AuthContext>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = PlexusStreamItem> + Send>>, PlexusError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
repos, or a path below it: child.m).