pub struct GrantReport {
pub agent: String,
pub allow_blueprint: bool,
pub entries: Vec<EntryStatus>,
}Expand description
Every [read_paths] entry a blueprint declares, with its grant verdict.
Fields§
§agent: StringThe agent name, which is also the [agent_read_paths.<name>] key.
allow_blueprint: boolWhether [security] allow_blueprint_read_paths is on, in which case
every declaration is granted wholesale.
entries: Vec<EntryStatus>One entry per declaration, in the order the blueprint wrote them.
Implementations§
Source§impl GrantReport
impl GrantReport
Sourcepub fn ungranted(&self) -> Vec<&str>
pub fn ungranted(&self) -> Vec<&str>
The entries that will be refused, in declaration order. Undetermined entries are left out: they may well work, and offering to grant one the user already granted would be worse than saying nothing.
Sourcepub fn has_ungranted(&self) -> bool
pub fn has_ungranted(&self) -> bool
Whether anything is refused, which is what every surface warns about.
Sourcepub fn summary(&self) -> String
pub fn summary(&self) -> String
"3 declared, 1 granted" - the one-line count for compact surfaces.
Sourcepub fn grant_stanza(&self) -> Vec<String>
pub fn grant_stanza(&self) -> Vec<String>
The config stanza that would grant everything currently refused, ready to paste. Empty when nothing is refused.
Sourcepub fn warning_line(&self) -> Option<String>
pub fn warning_line(&self) -> Option<String>
The one-line warning for surfaces that only have room for one, None
when nothing is refused.
Trait Implementations§
Source§impl Clone for GrantReport
impl Clone for GrantReport
Source§fn clone(&self) -> GrantReport
fn clone(&self) -> GrantReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GrantReport
impl Debug for GrantReport
impl Eq for GrantReport
Source§impl PartialEq for GrantReport
impl PartialEq for GrantReport
impl StructuralPartialEq for GrantReport
Auto Trait Implementations§
impl Freeze for GrantReport
impl RefUnwindSafe for GrantReport
impl Send for GrantReport
impl Sync for GrantReport
impl Unpin for GrantReport
impl UnsafeUnpin for GrantReport
impl UnwindSafe for GrantReport
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more