pub struct DefaultEnglishLocalizer;Expand description
Default English localizer used by the crate.
Trait Implementations§
Source§impl Clone for DefaultEnglishLocalizer
impl Clone for DefaultEnglishLocalizer
Source§fn clone(&self) -> DefaultEnglishLocalizer
fn clone(&self) -> DefaultEnglishLocalizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DefaultEnglishLocalizer
Source§impl Debug for DefaultEnglishLocalizer
impl Debug for DefaultEnglishLocalizer
Source§impl Default for DefaultEnglishLocalizer
impl Default for DefaultEnglishLocalizer
Source§fn default() -> DefaultEnglishLocalizer
fn default() -> DefaultEnglishLocalizer
Returns the “default value” for a type. Read more
Source§impl Localizer for DefaultEnglishLocalizer
impl Localizer for DefaultEnglishLocalizer
Source§fn attach_location<'a>(&self, base: Cow<'a, str>, loc: Location) -> Cow<'a, str>
fn attach_location<'a>(&self, base: Cow<'a, str>, loc: Location) -> Cow<'a, str>
Attach an ordinary error-location suffix to
base. Read moreSource§fn alias_defined_at(&self, defined: Location) -> String
fn alias_defined_at(&self, defined: Location) -> String
Suffix for alias-related errors when a distinct defined-location is available. Read more
Source§fn alias_used_at(&self, used: Location) -> String
fn alias_used_at(&self, used: Location) -> String
Suffix identifying where an aliased value is used in a plain-text diagnostic. Read more
Source§fn validation_issue_line(
&self,
resolved_path: &str,
entry: &str,
loc: Option<Location>,
) -> String
fn validation_issue_line( &self, resolved_path: &str, entry: &str, loc: Option<Location>, ) -> String
Render one validation issue line. Read more
Source§fn join_validation_issues(&self, lines: &[String]) -> String
fn join_validation_issues(&self, lines: &[String]) -> String
Join multiple validation issues into one message. Read more
Source§fn validation_failed(&self, issue_count: usize) -> Cow<'static, str>
fn validation_failed(&self, issue_count: usize) -> Cow<'static, str>
Summary for a validation report whose issues are shown as related miette diagnostics. Read more
Source§fn validation_failed_documents(&self, document_count: usize) -> String
fn validation_failed_documents(&self, document_count: usize) -> String
Summary for validation failures spanning multiple YAML documents. Read more
Source§fn defined(&self) -> Cow<'static, str>
fn defined(&self) -> Cow<'static, str>
Legacy label for a snippet window at the “definition” site. Read more
Source§fn defined_here(&self) -> Cow<'static, str>
fn defined_here(&self) -> Cow<'static, str>
Legacy label for a snippet window with only a “defined here” location. Read more
Source§fn value_used_here(&self) -> Cow<'static, str>
fn value_used_here(&self) -> Cow<'static, str>
Label used for the primary snippet window when an aliased/anchored value is used
at a different location than where it was defined, and for use sites in miette. Read more
Source§fn defined_window(&self) -> Cow<'static, str>
fn defined_window(&self) -> Cow<'static, str>
Label used for the secondary snippet window that points at the anchor definition.
Also used for validation definitions and definition-only locations in miette. Read more
Source§fn anchor_defined_here(&self) -> Cow<'static, str>
fn anchor_defined_here(&self) -> Cow<'static, str>
Label for an alias’s anchor definition in miette diagnostics. Read more
Source§fn included_from_here(&self) -> Cow<'static, str>
fn included_from_here(&self) -> Cow<'static, str>
Message identifying an include site in a diagnostic. Read more
Source§fn error_here(&self) -> Cow<'static, str>
fn error_here(&self) -> Cow<'static, str>
Label for the failing value when it differs from the alias definition and use. Read more
Source§fn validation_base_message(&self, entry: &str, resolved_path: &str) -> String
fn validation_base_message(&self, entry: &str, resolved_path: &str) -> String
Compose the base validation message used in snippets and miette diagnostics. Read more
Source§fn invalid_here(&self, base: &str) -> String
fn invalid_here(&self, base: &str) -> String
Compose the “invalid here” prefix for the primary snippet message. Read more
Source§fn value_comes_from_the_anchor(&self, def: Location) -> String
fn value_comes_from_the_anchor(&self, def: Location) -> String
Intro line printed between the primary and secondary snippet windows for
anchor/alias (“indirect value”) cases. Read more
Source§fn snippet_location_prefix(&self, loc: Location) -> String
fn snippet_location_prefix(&self, loc: Location) -> String
Optional hook to override the location prefix used for snippet titles Read more
Source§fn override_external_message<'a>(
&self,
_msg: ExternalMessage<'a>,
) -> Option<Cow<'a, str>>
fn override_external_message<'a>( &self, _msg: ExternalMessage<'a>, ) -> Option<Cow<'a, str>>
Best-effort hook to override/translate dependency-provided message text. Read more
Auto Trait Implementations§
impl Freeze for DefaultEnglishLocalizer
impl RefUnwindSafe for DefaultEnglishLocalizer
impl Send for DefaultEnglishLocalizer
impl Sync for DefaultEnglishLocalizer
impl Unpin for DefaultEnglishLocalizer
impl UnsafeUnpin for DefaultEnglishLocalizer
impl UnwindSafe for DefaultEnglishLocalizer
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