pub struct Naming(/* private fields */);Expand description
Default name generation and formatting implementation.
This type implements the Naming trait that is used for
naming generation and formatting.
Trait Implementations§
Source§impl Naming for Naming
impl Naming for Naming
Source§fn clone_boxed(&self) -> Box<dyn NamingTrait>
fn clone_boxed(&self) -> Box<dyn NamingTrait>
Clone this object into a new
Box.Source§fn builder(&self) -> Box<dyn NameBuilderTrait>
fn builder(&self) -> Box<dyn NameBuilderTrait>
Create a new name builder instance.
Source§fn format_type_name(&self, s: &str) -> String
fn format_type_name(&self, s: &str) -> String
Format the passed string
s as type name. Read moreSource§fn format_field_name(&self, s: &str) -> String
fn format_field_name(&self, s: &str) -> String
Format the passed string
s as field name. Read moreSource§fn format_variant_name(&self, s: &str) -> String
fn format_variant_name(&self, s: &str) -> String
Format the passed string
s as variant name. Read moreSource§fn format_module_name(&self, s: &str) -> String
fn format_module_name(&self, s: &str) -> String
Format the passed string
s as module name. Read moreSource§fn format_type_ident(&self, name: &Name, display_name: Option<&str>) -> Ident2
fn format_type_ident(&self, name: &Name, display_name: Option<&str>) -> Ident2
Create a suitable identifier for the passed type name
name respecting
user defined names stored in display_name. Read moreSource§fn format_field_ident(&self, name: &Name, display_name: Option<&str>) -> Ident2
fn format_field_ident(&self, name: &Name, display_name: Option<&str>) -> Ident2
Create a suitable identifier for the passed field name
name respecting
user defined names stored in display_name. Read moreSource§fn format_variant_ident(
&self,
name: &Name,
display_name: Option<&str>,
) -> Ident2
fn format_variant_ident( &self, name: &Name, display_name: Option<&str>, ) -> Ident2
Create a suitable identifier for the passed variant name
name respecting
user defined names stored in display_name. Read moreSource§fn format_module_ident(&self, name: &Name) -> Ident2
fn format_module_ident(&self, name: &Name) -> Ident2
Create a suitable identifier for the passed module name
name. Read moreSource§fn format_module(
&self,
types: &MetaTypes,
ns: Option<NamespaceId>,
) -> Option<Ident2>
fn format_module( &self, types: &MetaTypes, ns: Option<NamespaceId>, ) -> Option<Ident2>
Generate a identifier for the module identified by
ns.Auto Trait Implementations§
impl Freeze for Naming
impl RefUnwindSafe for Naming
impl Send for Naming
impl Sync for Naming
impl Unpin for Naming
impl UnwindSafe for Naming
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