#[non_exhaustive]pub struct NameOpts {
pub recurse_ttl: isize,
}
Expand description
Options for formatting the name of a type
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.recurse_ttl: isize
as 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 NameOpts
impl NameOpts
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§
Auto Trait Implementations§
impl Freeze for NameOpts
impl RefUnwindSafe for NameOpts
impl Send for NameOpts
impl Sync for NameOpts
impl Unpin for NameOpts
impl UnwindSafe for NameOpts
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