pub struct TypeDefinition {
pub name: Token,
pub loc: FileLocation,
pub contents: TypeDefinitionContents,
}
Expand description
Type definition with a name, location and inner contents for the different variants.
Fields§
§name: Token
Type definition name.
loc: FileLocation
Complete type definition’s textual location.
contents: TypeDefinitionContents
Inner contents of this type definition.
Trait Implementations§
Source§impl Clone for TypeDefinition
impl Clone for TypeDefinition
Source§fn clone(&self) -> TypeDefinition
fn clone(&self) -> TypeDefinition
Returns a duplicate of the value. Read more
1.0.0 · 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 TypeDefinition
impl Debug for TypeDefinition
Source§impl Display for TypeDefinition
impl Display for TypeDefinition
Source§impl<'a> FetchTarget<'a, TypeDefinition> for TypeDefinitionTarget
impl<'a> FetchTarget<'a, TypeDefinition> for TypeDefinitionTarget
Source§fn fetch_values(
&self,
spec: &'a Specification,
) -> Result<&'a [TypeDefinition], TargetError<Self>>
fn fetch_values( &self, spec: &'a Specification, ) -> Result<&'a [TypeDefinition], TargetError<Self>>
Fetch the map reference containing the targeted item.
Source§fn fetch_values_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut [TypeDefinition], TargetError<Self>>
fn fetch_values_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut [TypeDefinition], TargetError<Self>>
Fetch the mutable map reference containing the targeted item.
Source§fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
Fetch a reference to the target from the specification.
Source§fn fetch_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut V, TargetError<Self>>
fn fetch_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut V, TargetError<Self>>
Fetch a mutable reference to the target from the specification.
Source§impl PartialEq for TypeDefinition
impl PartialEq for TypeDefinition
impl StructuralPartialEq for TypeDefinition
Auto Trait Implementations§
impl Freeze for TypeDefinition
impl RefUnwindSafe for TypeDefinition
impl !Send for TypeDefinition
impl !Sync for TypeDefinition
impl Unpin for TypeDefinition
impl UnwindSafe for TypeDefinition
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