pub struct MicroDefinition {
pub name: Identifier,
pub generics: Vec<GenericParam>,
pub params: Vec<Param>,
pub return_type: Option<Type>,
pub body: Block,
pub annotations: Vec<Attribute>,
pub span: Span,
pub is_abstract: bool,
pub is_final: bool,
}Expand description
A micro (small function) declaration
Fields§
§name: IdentifierThe micro name.
generics: Vec<GenericParam>Generic parameters for the micro.
params: Vec<Param>Parameters for the micro.
return_type: Option<Type>Return type annotation, if any.
body: BlockThe body of the micro.
annotations: Vec<Attribute>Annotations applied to the micro.
span: SpanThe source code span.
is_abstract: boolWhether this function is abstract (has no body implementation).
is_final: boolWhether this function is final (cannot be overridden).
Trait Implementations§
Source§impl Clone for MicroDefinition
impl Clone for MicroDefinition
Source§fn clone(&self) -> MicroDefinition
fn clone(&self) -> MicroDefinition
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 MicroDefinition
impl Debug for MicroDefinition
Source§impl<'de> Deserialize<'de> for MicroDefinition
impl<'de> Deserialize<'de> for MicroDefinition
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
impl Eq for MicroDefinition
Source§impl Hash for MicroDefinition
impl Hash for MicroDefinition
Source§impl PartialEq for MicroDefinition
impl PartialEq for MicroDefinition
Source§fn eq(&self, other: &MicroDefinition) -> bool
fn eq(&self, other: &MicroDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MicroDefinition
impl Serialize for MicroDefinition
impl StructuralPartialEq for MicroDefinition
Auto Trait Implementations§
impl Freeze for MicroDefinition
impl RefUnwindSafe for MicroDefinition
impl Send for MicroDefinition
impl Sync for MicroDefinition
impl Unpin for MicroDefinition
impl UnsafeUnpin for MicroDefinition
impl UnwindSafe for MicroDefinition
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