pub struct TypeAlias {
pub matching_source: Fragment,
pub new_type_name: Identifier,
pub generics: Vec<Identifier>,
pub target_type: Option<Type>,
}Available on crate feature
ast-models only.Expand description
A type alias in wright source code.
i.e. type Bytes = [u8]; or type Opaque;
Fields§
§matching_source: FragmentFull matching source including whitespace.
new_type_name: IdentifierThe name of the new/aliased type.
generics: Vec<Identifier>Generic type parameters, such as the T in type List<T> = Vec<T>;.
target_type: Option<Type>The type aliased to if any (we support abstract pub type Void;) style declarations.
Trait Implementations§
impl StructuralPartialEq for TypeAlias
Auto Trait Implementations§
impl Forget for TypeAlias
impl Freeze for TypeAlias
impl RefUnwindSafe for TypeAlias
impl Send for TypeAlias
impl Sync for TypeAlias
impl Unpin for TypeAlias
impl UnsafeUnpin for TypeAlias
impl UnwindSafe for TypeAlias
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more