pub enum TrustDecision {
Ask,
Always,
Never,
}Expand description
§2 module 14 trust’s [capabilities.trust] default = "ask" | "always" | "never" decision (§3.1 schema; every preset that turns trust on sets
default = "ask", pi’s own defaultProjectTrust default). See the
module doc comment’s “Trust model” section for why, absent an
interactive upgrade path in this build, only TrustDecision::Always
actually unlocks plugin loading — Ask/Never both cleanly refuse
rather than silently granting or hanging on a prompt nothing answers.
Variants§
Ask
Prompt before trusting — pi’s own default. No interactive handler is
wired in this build (honest gap, see the module doc comment), so
this behaves like TrustDecision::Never for is_trusted.
Always
Always trusted — the only value is_trusted accepts today.
Never
Never trusted, regardless of anything else.
Implementations§
Source§impl TrustDecision
impl TrustDecision
Sourcepub fn parse(s: &str) -> Option<TrustDecision>
pub fn parse(s: &str) -> Option<TrustDecision>
Parse the "ask" / "always" / "never" config strings (§3.1).
Unrecognized text is never silently trusted — the resolver treats an
unparseable value the same as “not always” (see is_trusted),
so an operator typo fails closed, not open.
Trait Implementations§
Source§impl Clone for TrustDecision
impl Clone for TrustDecision
Source§fn clone(&self) -> TrustDecision
fn clone(&self) -> TrustDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TrustDecision
Source§impl Debug for TrustDecision
impl Debug for TrustDecision
Source§impl Default for TrustDecision
impl Default for TrustDecision
Source§fn default() -> TrustDecision
fn default() -> TrustDecision
impl Eq for TrustDecision
Source§impl PartialEq for TrustDecision
impl PartialEq for TrustDecision
impl StructuralPartialEq for TrustDecision
Auto Trait Implementations§
impl Freeze for TrustDecision
impl RefUnwindSafe for TrustDecision
impl Send for TrustDecision
impl Sync for TrustDecision
impl Unpin for TrustDecision
impl UnsafeUnpin for TrustDecision
impl UnwindSafe for TrustDecision
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,
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§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.