pub struct TypeNameOpts {
pub recurse_ttl: isize,
}Expand description
Options for formatting the name of a type.
Controls recursion depth when printing nested types like Option<Vec<String>>.
Fields§
§recurse_ttl: isizeAs long as this is > 0, keep formatting the type parameters.
When it reaches 0, format type parameters as ….
If negative, all type parameters are formatted (infinite recursion).
Implementations§
Source§impl TypeNameOpts
impl TypeNameOpts
Sourcepub const fn infinite() -> Self
pub const fn infinite() -> Self
Create options where all type parameters are formatted (infinite depth).
Sourcepub const fn for_children(&self) -> Option<Self>
pub const fn for_children(&self) -> Option<Self>
Decrease the recurse_ttl for child type parameters.
Returns None if you should render … instead of type parameters.
Returns Some(opts) with decremented TTL to pass to children.
Trait Implementations§
Source§impl Clone for TypeNameOpts
impl Clone for TypeNameOpts
Source§fn clone(&self) -> TypeNameOpts
fn clone(&self) -> TypeNameOpts
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 Default for TypeNameOpts
impl Default for TypeNameOpts
impl Copy for TypeNameOpts
Auto Trait Implementations§
impl Freeze for TypeNameOpts
impl RefUnwindSafe for TypeNameOpts
impl Send for TypeNameOpts
impl Sync for TypeNameOpts
impl Unpin for TypeNameOpts
impl UnwindSafe for TypeNameOpts
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