pub enum Ty {
Self_,
Ref(Box<Ty>, Mutability),
Path(Path),
Unit,
}
Expand description
A type. Supports pointers, Self, and literals.
Variants§
Self_
Ref(Box<Ty>, Mutability)
A reference.
Path(Path)
mod::mod::Type<[lifetime], [Params...]>
, including a plain type
parameter, and things like i32
Unit
For () return types.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnwindSafe for Ty
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
Self_
: 0 bytesRef
: 16 bytesPath
: 56 bytesUnit
: 0 bytes