pub struct ModeRegistry { /* private fields */ }Implementations§
Source§impl ModeRegistry
impl ModeRegistry
Sourcepub fn build_default(evaluator: Arc<dyn PolicyEvaluator>) -> ModeRegistry
pub fn build_default(evaluator: Arc<dyn PolicyEvaluator>) -> ModeRegistry
Build the default registry with 5 standards-track modes and 1 built-in extension.
pub fn get_mode(&self, name: &str) -> Option<ModeRef<'_>>
pub fn standard_mode_names(&self) -> Vec<String>
pub fn standard_mode_descriptors(&self) -> Vec<ModeDescriptor>
pub fn extension_mode_names(&self) -> Vec<String>
pub fn extension_mode_descriptors(&self) -> Vec<ModeDescriptor>
pub fn all_mode_names(&self) -> Vec<String>
pub fn all_mode_descriptors(&self) -> Vec<ModeDescriptor>
pub fn all_mode_conformance(&self) -> Vec<(String, ModeConformanceCatalog)>
pub fn is_standard_mode(&self, name: &str) -> bool
pub fn requires_strict_session_start(&self, name: &str) -> bool
Sourcepub fn get_mode_version(&self, name: &str) -> Option<String>
pub fn get_mode_version(&self, name: &str) -> Option<String>
Returns the mode_version from the mode’s descriptor, if available.
Sourcepub fn register_extension(
&self,
descriptor: ModeDescriptor,
) -> Result<(), String>
pub fn register_extension( &self, descriptor: ModeDescriptor, ) -> Result<(), String>
Register a new descriptor-driven extension mode dynamically.
Dynamically registered extensions currently use PassthroughMode, which
validates only the descriptor-declared message types and commitment
authority. This keeps runtime behavior explicit until a richer external
plugin mechanism is introduced.
Sourcepub fn unregister_extension(&self, mode: &str) -> Result<(), String>
pub fn unregister_extension(&self, mode: &str) -> Result<(), String>
Unregister a dynamically registered extension mode.
Sourcepub fn promote_mode(
&self,
mode: &str,
new_name: Option<&str>,
) -> Result<String, String>
pub fn promote_mode( &self, mode: &str, new_name: Option<&str>, ) -> Result<String, String>
Promote an extension mode to standards-track. Optionally re-keys the entry with a new identifier.
Sourcepub fn subscribe_changes(&self) -> Receiver<()>
pub fn subscribe_changes(&self) -> Receiver<()>
Subscribe to mode registry change notifications.
Auto Trait Implementations§
impl !Freeze for ModeRegistry
impl !RefUnwindSafe for ModeRegistry
impl !UnwindSafe for ModeRegistry
impl Send for ModeRegistry
impl Sync for ModeRegistry
impl Unpin for ModeRegistry
impl UnsafeUnpin for ModeRegistry
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request