pub enum DataTypeDeclaration {
Reference {
referenced_type: String,
location: SourceLocation,
},
Definition {
data_type: Box<DataType>,
location: SourceLocation,
scope: Option<String>,
},
Aggregate {
referenced_type: String,
location: SourceLocation,
},
}Variants§
Implementations§
Source§impl DataTypeDeclaration
impl DataTypeDeclaration
pub fn reference( referenced_type: impl Into<String>, location: SourceLocation, ) -> DataTypeDeclaration
pub fn get_name(&self) -> Option<&str>
pub fn get_location(&self) -> SourceLocation
pub fn get_referenced_type(&self) -> Option<&str>
pub fn get_inner_pointer_ty(&self) -> Option<DataTypeDeclaration>
pub fn is_type_safe_pointer(&self) -> bool
pub fn is_aggregate(&self) -> bool
pub fn is_reference_to(&self) -> bool
Trait Implementations§
Source§impl Clone for DataTypeDeclaration
impl Clone for DataTypeDeclaration
Source§fn clone(&self) -> DataTypeDeclaration
fn clone(&self) -> DataTypeDeclaration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataTypeDeclaration
impl Debug for DataTypeDeclaration
Source§impl<'de> Deserialize<'de> for DataTypeDeclarationwhere
'de: 'static,
impl<'de> Deserialize<'de> for DataTypeDeclarationwhere
'de: 'static,
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 From<&DataTypeDeclaration> for SourceLocation
impl From<&DataTypeDeclaration> for SourceLocation
Source§fn from(value: &DataTypeDeclaration) -> Self
fn from(value: &DataTypeDeclaration) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DataTypeDeclaration
impl PartialEq for DataTypeDeclaration
Source§fn eq(&self, other: &DataTypeDeclaration) -> bool
fn eq(&self, other: &DataTypeDeclaration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DataTypeDeclaration
impl Serialize for DataTypeDeclaration
Source§impl Walker for DataTypeDeclaration
impl Walker for DataTypeDeclaration
fn walk<V>(&self, visitor: &mut V)where
V: AstVisitor,
Source§impl WalkerMut for DataTypeDeclaration
impl WalkerMut for DataTypeDeclaration
fn walk<V>(&mut self, visitor: &mut V)where
V: AstVisitorMut,
impl StructuralPartialEq for DataTypeDeclaration
Auto Trait Implementations§
impl Freeze for DataTypeDeclaration
impl RefUnwindSafe for DataTypeDeclaration
impl Send for DataTypeDeclaration
impl Sync for DataTypeDeclaration
impl Unpin for DataTypeDeclaration
impl UnsafeUnpin for DataTypeDeclaration
impl UnwindSafe for DataTypeDeclaration
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