#[non_exhaustive]pub struct CheckReport {
pub items: Vec<CheckItem>,
}Expand description
What I18n::check found, sorted. Display lists it line by line.
use i18n_next::{CheckItem, I18n};
let i18n = I18n::builder()
.locale("en")
.messages("en", None, r#"{"hi": "Hi {name}", "bye": "Bye"}"#)
.messages("de", None, r#"{"hi": "Hallo {nam}"}"#)
.build()?;
let report = i18n.check();
assert!(!report.is_clean());
assert!(report.items.contains(&CheckItem::MissingKey {
locale: "de".into(),
page: "index".into(),
key: "bye".into(),
}));
println!("{report}");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.items: Vec<CheckItem>Every finding, sorted (by kind, then locale, page, key).
Implementations§
Trait Implementations§
Source§impl Clone for CheckReport
impl Clone for CheckReport
Source§impl Debug for CheckReport
impl Debug for CheckReport
Source§impl Default for CheckReport
impl Default for CheckReport
Source§impl Display for CheckReport
impl Display for CheckReport
impl Eq for CheckReport
Source§impl PartialEq for CheckReport
impl PartialEq for CheckReport
impl StructuralPartialEq for CheckReport
Auto Trait Implementations§
impl Forget for CheckReport
impl Freeze for CheckReport
impl Move for CheckReport
impl RefUnwindSafe for CheckReport
impl Send for CheckReport
impl Sync for CheckReport
impl Unpin for CheckReport
impl UnsafeUnpin for CheckReport
impl UnwindSafe for CheckReport
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