pub struct Answer {
pub decision: Decision,
pub scope: Scope,
pub note: Option<String>,
pub reason: Option<String>,
pub by: Option<Who>,
pub always: bool,
pub resume_asking: bool,
}Expand description
A person’s answer (“later” is no answer: nothing is journaled until one exists).
Fields§
§decision: DecisionApprove, reject or stop.
scope: ScopeHow far an approval reaches.
note: Option<String>An approval’s note to the model.
reason: Option<String>A rejection’s reason — the model is told.
by: Option<Who>Who answered; journaled with the answer.
always: bool“Always Allow”: approved once, and the exact argv added to the project’s allow list (the runtime does that, never the interface).
resume_asking: boolWith a batch decision: start the run’s asking budget again.
Implementations§
Source§impl Answer
impl Answer
Sourcepub fn always(by: Option<Who>) -> Self
pub fn always(by: Option<Who>) -> Self
Always Allow: this call once, and exactly its argv into
[commands] allow (or [sandbox] network_allow).
Sourcepub fn approve(scope: Scope, note: Option<String>, by: Option<Who>) -> Self
pub fn approve(scope: Scope, note: Option<String>, by: Option<Who>) -> Self
An approval with scope and an optional note to the model.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Answer
impl<'de> Deserialize<'de> for Answer
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
impl Eq for Answer
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnsafeUnpin for Answer
impl UnwindSafe for Answer
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
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> 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
Compare self to
key and return true if they are equal.