pub struct UsedType {
pub original_ty: Type,
pub resolved_ty: Type,
pub resolved_ty_inner: Option<Type>,
pub composite_type: Option<CompositeTypeMacro>,
pub variadic: bool,
pub default: Option<String>,
pub optional: bool,
pub result: bool,
}Expand description
A type, optionally with an overriding composite type name
Fields§
§original_ty: Type§resolved_ty: Type§resolved_ty_inner: Option<Type>§composite_type: Option<CompositeTypeMacro>Set via composite_type!()
variadic: boolSet via VariadicArray or variadic!()
default: Option<String>§optional: boolSet via nullable argument wrappers such as Option<T>, Nullable<T>, or Internal.
result: boolSet via the type being a Result<T>
Implementations§
Source§impl UsedType
impl UsedType
pub fn new(ty: Type) -> Result<Self>
pub fn entity_tokens(&self) -> Expr
pub fn section_len_tokens(&self) -> TokenStream2
pub fn section_writer_tokens(&self, writer: TokenStream2) -> TokenStream2
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UsedType
impl RefUnwindSafe for UsedType
impl !Send for UsedType
impl !Sync for UsedType
impl Unpin for UsedType
impl UnsafeUnpin for UsedType
impl UnwindSafe for UsedType
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