pub struct BeholderStatus {
pub text: String,
pub rewrite_added: Option<Vec<String>>,
}Expand description
Opaque string surfaced on TaskRunMeta.beholder_status.
Examples: "attached:cargo@1.78", "none:auto", "declined:cargo reason=\"explicit --message-format=human\"", "unknown_format",
"attached:cargo@1.78 rewrite=\"--message-format=json-render-diagnostics\"".
Fields§
§text: String§rewrite_added: Option<Vec<String>>Args added to argv by a Rewriter beholder. None for Parser mode or
when no beholder attached.
Implementations§
Source§impl BeholderStatus
impl BeholderStatus
pub fn none_auto() -> Self
Sourcepub fn none_explicit() -> Self
pub fn none_explicit() -> Self
Bytes-only because the caller explicitly set BeholderSelect::None.
pub fn attached(name: &str, version: &str) -> Self
pub fn declined(name: &str, reason: &str) -> Self
Sourcepub fn forced(name: &str, version: &str) -> Self
pub fn forced(name: &str, version: &str) -> Self
BeholderSelect::Force matched; matches predicate agreed.
Sourcepub fn forced_against_flags(name: &str, version: &str) -> Self
pub fn forced_against_flags(name: &str, version: &str) -> Self
BeholderSelect::Force matched; beholder’s matches would have declined.
Sourcepub fn forced_against_tty(name: &str, version: &str) -> Self
pub fn forced_against_tty(name: &str, version: &str) -> Self
BeholderSelect::Force matched on a TTY-attached run where a Rewriter
beholder would normally decline to preserve human output.
pub fn unknown_format() -> Self
Sourcepub fn unknown_format_with_reason(name: &str, reason: &str) -> Self
pub fn unknown_format_with_reason(name: &str, reason: &str) -> Self
Beholder detected that the tool’s output format is unrecognized (schema drift). Records which beholder made the call and why.
Sourcepub fn with_rewrite(self, added: Vec<String>) -> Self
pub fn with_rewrite(self, added: Vec<String>) -> Self
Append rewrite info to this status if added is non-empty.
Called after a Rewriter beholder adjusts argv so agents can see exactly
what was injected into the command line.
Trait Implementations§
Source§impl Clone for BeholderStatus
impl Clone for BeholderStatus
Source§fn clone(&self) -> BeholderStatus
fn clone(&self) -> BeholderStatus
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 BeholderStatus
impl Debug for BeholderStatus
Source§impl<'de> Deserialize<'de> for BeholderStatus
impl<'de> Deserialize<'de> for BeholderStatus
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>,
Auto Trait Implementations§
impl Freeze for BeholderStatus
impl RefUnwindSafe for BeholderStatus
impl Send for BeholderStatus
impl Sync for BeholderStatus
impl Unpin for BeholderStatus
impl UnsafeUnpin for BeholderStatus
impl UnwindSafe for BeholderStatus
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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> 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<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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