pub struct TypeName(/* private fields */);Expand description
A type a rendered module declares.
Implementations§
Source§impl TypeName
impl TypeName
Sourcepub fn declared(spelling: &str) -> Result<Self, DeclarationError>
pub fn declared(spelling: &str) -> Result<Self, DeclarationError>
This declared type name, from the spelling an author wrote.
§Errors
Returns DeclarationError::NotAnIdentifier where the spelling cannot name a rendered item — not one Rust identifier, or a keyword the language already took: it is written into a consumer’s target in identifier position, and either disagreement renders tokens that compiler reads as something else.
Trait Implementations§
impl Eq for TypeName
Source§impl Ord for TypeName
impl Ord for TypeName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for TypeName
impl PartialOrd for TypeName
impl StructuralPartialEq for TypeName
Auto Trait Implementations§
impl Freeze for TypeName
impl RefUnwindSafe for TypeName
impl Send for TypeName
impl Sync for TypeName
impl Unpin for TypeName
impl UnsafeUnpin for TypeName
impl UnwindSafe for TypeName
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