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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 a 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 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 defined(&self) -> Cow<'static, str>
fn defined(&self) -> Cow<'static, str>
Label used for a snippet window when the location is known and considered the
“definition” site. Read more
Source§fn defined_here(&self) -> Cow<'static, str>
fn defined_here(&self) -> Cow<'static, str>
Label used for a snippet window when we only have 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. 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. 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 snippet rendering. 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
impl Copy for DefaultEnglishLocalizer
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