pub struct CheckItem {
pub category: String,
pub name: String,
pub status: CheckStatus,
pub message: String,
pub hint: Option<String>,
pub detail: Option<String>,
}Expand description
A single diagnostic check result.
Fields§
§category: StringCheck category (e.g., platform_cli, agent, gf_self, agent_env).
name: StringCheck item name (e.g., “gh CLI installed”).
status: CheckStatusResult status.
message: StringHuman-readable description (Chinese-first).
hint: Option<String>Fix suggestion (provided on Fail/Warn).
detail: Option<String>Additional detail (e.g., version string, path).
Implementations§
Source§impl CheckItem
impl CheckItem
Sourcepub fn pass(
category: impl Into<String>,
name: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn pass( category: impl Into<String>, name: impl Into<String>, message: impl Into<String>, ) -> Self
Create a passing check item.
Sourcepub fn warn(
category: impl Into<String>,
name: impl Into<String>,
message: impl Into<String>,
hint: impl Into<String>,
) -> Self
pub fn warn( category: impl Into<String>, name: impl Into<String>, message: impl Into<String>, hint: impl Into<String>, ) -> Self
Create a warning check item.
Sourcepub fn fail(
category: impl Into<String>,
name: impl Into<String>,
message: impl Into<String>,
hint: impl Into<String>,
) -> Self
pub fn fail( category: impl Into<String>, name: impl Into<String>, message: impl Into<String>, hint: impl Into<String>, ) -> Self
Create a failing check item.
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
Attach a detail string to this check item (builder pattern).
Trait Implementations§
Auto Trait Implementations§
impl Forget for CheckItem
impl Freeze for CheckItem
impl Move for CheckItem
impl RefUnwindSafe for CheckItem
impl Send for CheckItem
impl Sync for CheckItem
impl Unpin for CheckItem
impl UnsafeUnpin for CheckItem
impl UnwindSafe for CheckItem
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<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> ⓘ
Converts
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> ⓘ
Converts
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