pub struct Question {
pub title: String,
pub text: String,
pub warning: Option<String>,
pub access: Access,
pub always_ask: bool,
}Expand description
A question a tool asks the user while it runs, e.g. “Load this workspace’s Nix dev shell?”. Shown as an approval card with only Allow and Deny: the tool remembers the answer itself, so “always allow” grants don’t apply.
Fields§
§title: StringPhrased like a pending title: “Load the workspace’s Nix dev shell (flake.nix)”.
text: StringWhat saying yes means, for the card (a few short lines).
warning: Option<String>Shown prominently, e.g. “installs system-wide”.
access: AccessDecides who answers: the permission policy for this level may answer for the user
(e.g. --auto-approve), unless Question::always_ask.
always_ask: boolOnly a person may say yes: not the policy, not --auto-approve.
Trait Implementations§
impl Eq for Question
impl StructuralPartialEq for Question
Auto Trait Implementations§
impl Forget for Question
impl Freeze for Question
impl Move for Question
impl RefUnwindSafe for Question
impl Send for Questionwhere
RawVecInner: Send,
impl Sync for Questionwhere
RawVecInner: Sync,
impl Unpin for Question
impl UnsafeUnpin for Question
impl UnwindSafe for Questionwhere
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.