pub enum Scope {
Global,
Namespace(String),
Service {
namespace: String,
service: String,
},
}Expand description
Represents where a resource is defined in the configuration hierarchy.
Sentinel supports three levels of scoping:
- Global: Resources defined at the root level, visible everywhere
- Namespace: Resources scoped to a namespace, visible within that namespace
- Service: Resources scoped to a service within a namespace
The resolution order follows “most specific wins”: Service → Namespace → Global.
Variants§
Global
Global scope - visible everywhere in the configuration
Namespace(String)
Namespace scope - visible within the namespace and its services
Service
Service scope - local to a specific service within a namespace
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scope
impl<'de> Deserialize<'de> for Scope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Scope> for ScopeLabels
impl From<&Scope> for ScopeLabels
Source§impl From<Scope> for ScopeLabels
impl From<Scope> for ScopeLabels
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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