pub struct CustomAuthority {
pub path: Vec<String>,
pub category: Category,
pub risk: Risk,
pub description: String,
}Expand description
A user-defined authority pattern loaded from .capsec.toml.
Custom authorities let teams flag project-specific I/O entry points that the built-in registry doesn’t cover — database query functions, internal RPC clients, secret-fetching utilities, etc.
§Example .capsec.toml
[[authority]]
path = ["my_crate", "secrets", "fetch"]
category = "net"
risk = "critical"
description = "Fetches secrets from vault"Fields§
§path: Vec<String>Path segments to match by suffix (e.g., ["my_crate", "secrets", "fetch"]).
category: CategoryWhat kind of ambient authority this is.
risk: RiskHow dangerous this call is.
description: StringHuman-readable description shown in audit output.
Trait Implementations§
Source§impl Clone for CustomAuthority
impl Clone for CustomAuthority
Source§fn clone(&self) -> CustomAuthority
fn clone(&self) -> CustomAuthority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CustomAuthority
impl RefUnwindSafe for CustomAuthority
impl Send for CustomAuthority
impl Sync for CustomAuthority
impl Unpin for CustomAuthority
impl UnsafeUnpin for CustomAuthority
impl UnwindSafe for CustomAuthority
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