pub struct SourceAuthority { /* private fields */ }Expand description
Immutable host authority shared by requests that load or evaluate source.
Construction is deliberately available only from trusted Rust code. Source data has no decoder or read-constructor for this value, and its data projection omits the trusted read policy.
Implementations§
Source§impl SourceAuthority
impl SourceAuthority
Sourcepub fn new(
read_policy: ReadPolicy,
requires: Vec<CapabilityName>,
allow: CapabilitySet,
) -> Result<Self>
pub fn new( read_policy: ReadPolicy, requires: Vec<CapabilityName>, allow: CapabilitySet, ) -> Result<Self>
Builds authority after checking that its read policy admits explicit evaluation. Required powers retain caller order; allowed powers retain set semantics.
Sourcepub fn read_policy(&self) -> &ReadPolicy
pub fn read_policy(&self) -> &ReadPolicy
Returns the trusted policy governing source decoding.
Sourcepub fn requires(&self) -> &[CapabilityName]
pub fn requires(&self) -> &[CapabilityName]
Returns the caller powers required before source evaluation.
Sourcepub fn allow(&self) -> &CapabilitySet
pub fn allow(&self) -> &CapabilitySet
Returns the maximum powers allowed during source evaluation.
Sourcepub fn decision_datum(&self) -> Datum
pub fn decision_datum(&self) -> Datum
Projects authority for decision data without exposing read-policy trust or capability internals.
Trait Implementations§
Source§impl Clone for SourceAuthority
impl Clone for SourceAuthority
Source§fn clone(&self) -> SourceAuthority
fn clone(&self) -> SourceAuthority
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceAuthority
impl Debug for SourceAuthority
impl Eq for SourceAuthority
Source§impl PartialEq for SourceAuthority
impl PartialEq for SourceAuthority
impl StructuralPartialEq for SourceAuthority
Auto Trait Implementations§
impl Freeze for SourceAuthority
impl RefUnwindSafe for SourceAuthority
impl Send for SourceAuthority
impl Sync for SourceAuthority
impl Unpin for SourceAuthority
impl UnsafeUnpin for SourceAuthority
impl UnwindSafe for SourceAuthority
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