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