pub struct CallEffects {
pub keys: Vec<EffectKey>,
pub complete: bool,
pub understood: bool,
}Expand description
The effects of one call, declared by its tool from the arguments.
Fields§
§keys: Vec<EffectKey>§complete: boolkeys lists everything the call does. false means the tool could
not tell (an opaque script), so policies must not read the list as
exhaustive.
understood: boolEvery part of the call was read and keys name what it changes,
though the tool does not vouch for the list as complete (a shell
command made only of programs it models: a copy into the work area,
a listing, date). After the owner declines a step, such a call that
deletes nothing and reaches nothing outside is not taken for the
declined action by another route.
Implementations§
Source§impl CallEffects
impl CallEffects
Sourcepub fn unknown() -> CallEffects
pub fn unknown() -> CallEffects
Effects not declared: the call may do anything.
Sourcepub fn none() -> CallEffects
pub fn none() -> CallEffects
The call has no effects (a read).
Sourcepub fn from_access(
access: &AccessManifest,
annotations: ToolAnnotations,
) -> CallEffects
pub fn from_access( access: &AccessManifest, annotations: ToolAnnotations, ) -> CallEffects
The effects a call’s declared access implies, for a tool that
declares crate::Tool::access but not crate::Tool::effects:
every written path (EffectKey::path) a EffectClass::Write
(and a EffectClass::Delete too for a destructive tool), every
host contacted an EffectClass::Egress (host:port, the port
from the declaration, else the scheme’s, https for a bare host), every command a
EffectClass::Process named by its program. A read-only tool
changes nothing, so only its hosts count. Never complete: the tool
declared what it touches, not that the list is all it does. A
relative path names no key (declare absolute paths, as
Workspace::declare gives). CallEffects::unknown for an empty
manifest.
With these keys an owner’s denial binds the rest of the run: a later call that writes the same path, by any tool, is refused.
Sourcepub fn touches_no_paths(&self) -> bool
pub fn touches_no_paths(&self) -> bool
The tool vouches that the call changes no file: the list is
complete and names no path. For a call that may change things
(whose default effects are CallEffects::unknown), scope and
approval policies take an empty crate::AccessManifest as “changes
no path”, not “paths not declared”. A delegation, a ticket or an
order lookup declares this with CallEffects::none or its own
non-path keys. Effects never describe reads.
Trait Implementations§
Source§impl Clone for CallEffects
impl Clone for CallEffects
Source§fn clone(&self) -> CallEffects
fn clone(&self) -> CallEffects
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 CallEffects
impl Debug for CallEffects
Source§impl<'de> Deserialize<'de> for CallEffects
impl<'de> Deserialize<'de> for CallEffects
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CallEffects, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CallEffects, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CallEffects
Source§impl PartialEq for CallEffects
impl PartialEq for CallEffects
Source§impl Serialize for CallEffects
impl Serialize for CallEffects
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CallEffects
Auto Trait Implementations§
impl Forget for CallEffects
impl Freeze for CallEffects
impl Move for CallEffects
impl RefUnwindSafe for CallEffects
impl Send for CallEffectswhere
RawVecInner: Send,
impl Sync for CallEffectswhere
RawVecInner: Sync,
impl Unpin for CallEffects
impl UnsafeUnpin for CallEffects
impl UnwindSafe for CallEffectswhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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