pub struct ArrayType {
pub ty: Type,
pub len: usize,
}Expand description
A fixed-size, homogenous vector type.
Fields§
§ty: Type§len: usizeImplementations§
Source§impl ArrayType
impl ArrayType
Sourcepub fn new(ty: Type, len: usize) -> Self
pub fn new(ty: Type, len: usize) -> Self
Create a new ArrayType of length len and element type of ty
Sourcepub fn element_type(&self) -> &Type
pub fn element_type(&self) -> &Type
Get the element type of this array type
Sourcepub fn min_alignment(&self) -> usize
pub fn min_alignment(&self) -> usize
Returns the minimum alignment required by this type
Sourcepub fn size_in_bits(&self) -> usize
pub fn size_in_bits(&self) -> usize
Returns the size in bits of this array type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ArrayType
impl<'de> Deserialize<'de> for ArrayType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PrettyPrint for ArrayType
impl PrettyPrint for ArrayType
Source§fn to_pretty_string(&self) -> String
fn to_pretty_string(&self) -> String
Source§fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn pretty_print(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Pretty-print this object to the given core::fmt::Formatter. Read more
impl Eq for ArrayType
impl StructuralPartialEq for ArrayType
Auto Trait Implementations§
impl Freeze for ArrayType
impl RefUnwindSafe for ArrayType
impl Send for ArrayType
impl Sync for ArrayType
impl Unpin for ArrayType
impl UnwindSafe for ArrayType
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