pub struct TypeNameOpts {
pub recurse_ttl: isize,
}Expand description
Options for formatting the name of a type
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
Implementations§
Source§impl TypeNameOpts
impl TypeNameOpts
Sourcepub fn none() -> Self
pub fn none() -> Self
Create a new NameOpts for which none of the type parameters are formatted
Sourcepub fn for_children(&self) -> Option<Self>
pub fn for_children(&self) -> Option<Self>
Decrease the recurse_ttl — if it’s != 0, returns options to pass when
formatting children type parameters.
If this returns None and you have type parameters, you should render a
… (unicode ellipsis) character instead of your list of types.
See the implementation for Vec for examples.
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