#[non_exhaustive]pub struct TableHealth {
pub name: String,
pub health: Health,
pub reported: String,
}Expand description
One table’s name and what was concluded about it.
use kevy_cli::doctor::{Health, check_table};
let mut client = kevy_resp_client::RespClient::connect("127.0.0.1", port)?;
let h = check_table(&mut client, "users")?;
println!("{} {:?} ({})", h.name, h.health, h.reported);
assert_eq!((h.name.as_str(), h.health), ("users", Health::Ok));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe declared table name.
use kevy_cli::doctor::check_table;
let mut client = kevy_resp_client::RespClient::connect("127.0.0.1", port)?;
assert_eq!(check_table(&mut client, "users")?.name, "users");health: HealthThe verdict.
use kevy_cli::doctor::{Health, check_table};
let mut client = kevy_resp_client::RespClient::connect("127.0.0.1", port)?;
assert_eq!(check_table(&mut client, "users")?.health, Health::Ok);reported: StringThe counters worth showing whatever the verdict — the exclusion causes, which are legitimate states rather than problems.
use kevy_cli::doctor::check_table;
let mut client = kevy_resp_client::RespClient::connect("127.0.0.1", port)?;
let h = check_table(&mut client, "users")?;
assert!(h.reported.starts_with("rows 2 · entries 2"), "{}", h.reported);Trait Implementations§
Source§impl Clone for TableHealth
impl Clone for TableHealth
Source§impl Debug for TableHealth
impl Debug for TableHealth
impl Eq for TableHealth
Source§impl Hash for TableHealth
impl Hash for TableHealth
Source§impl PartialEq for TableHealth
impl PartialEq for TableHealth
impl StructuralPartialEq for TableHealth
Auto Trait Implementations§
impl Freeze for TableHealth
impl RefUnwindSafe for TableHealth
impl Send for TableHealth
impl Sync for TableHealth
impl Unpin for TableHealth
impl UnsafeUnpin for TableHealth
impl UnwindSafe for TableHealth
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