Skip to main content

ContextManager

Trait ContextManager 

Source
pub trait ContextManager: Send + Sync {
    // Required methods
    fn set_string(&self, key: &str, value: String);
    fn get_string(&self, key: &str) -> Option<String>;
    fn remove_string(&self, key: &str) -> bool;
    fn clear_all(&self);
}
Expand description

Context manager trait for different context implementations

This trait provides a common interface for different types of context storage.

Required Methods§

Source

fn set_string(&self, key: &str, value: String)

Set a string value in the context

Source

fn get_string(&self, key: &str) -> Option<String>

Get a string value from the context

Source

fn remove_string(&self, key: &str) -> bool

Remove a string value from the context

Source

fn clear_all(&self)

Clear all context values

Implementors§