pub struct TypeArray {
pub ty: Box<Type>,
pub bracket_token: Bracket,
pub size: Option<Box<Expr>>,
}
Expand description
An array type.
Fields§
§ty: Box<Type>
§bracket_token: Bracket
§size: Option<Box<Expr>>
Implementations§
Source§impl TypeArray
impl TypeArray
Sourcepub fn size_lit(&self) -> Option<&LitNumber>
pub fn size_lit(&self) -> Option<&LitNumber>
Returns the size of the array, or None if dynamic.
Sourcepub fn is_abi_dynamic(&self) -> bool
pub fn is_abi_dynamic(&self) -> bool
See Type::is_abi_dynamic
.
Sourcepub fn parse_nested(ty: Box<Type>, input: ParseStream<'_>) -> Result<Self>
pub fn parse_nested(ty: Box<Type>, input: ParseStream<'_>) -> Result<Self>
Parses an array type from the given input stream, wrapping ty
with it.
Trait Implementations§
Source§impl Spanned for TypeArray
impl Spanned for TypeArray
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.impl Eq for TypeArray
Auto Trait Implementations§
impl Freeze for TypeArray
impl RefUnwindSafe for TypeArray
impl !Send for TypeArray
impl !Sync for TypeArray
impl Unpin for TypeArray
impl UnwindSafe for TypeArray
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)