pub struct GenericParam<P: Phase = Raw> {
pub name: Spanned<GenericParamName>,
pub constraint: GenericConstraint,
pub default: Option<TypeExpr<P>>,
}Expand description
A generic parameter: D: Dim
Fields§
§name: Spanned<GenericParamName>§constraint: GenericConstraint§default: Option<TypeExpr<P>>Optional default type, e.g. F: Type = Unframed.
Trait Implementations§
Source§impl<P: Clone + Phase> Clone for GenericParam<P>
impl<P: Clone + Phase> Clone for GenericParam<P>
Source§fn clone(&self) -> GenericParam<P>
fn clone(&self) -> GenericParam<P>
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 FormatEquivalent for GenericParam
impl FormatEquivalent for GenericParam
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Source§impl From<GenericParam> for GenericParam<Desugared>
impl From<GenericParam> for GenericParam<Desugared>
Source§fn from(g: GenericParam<Raw>) -> Self
fn from(g: GenericParam<Raw>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for GenericParam<P>
impl<P> RefUnwindSafe for GenericParam<P>
impl<P> Send for GenericParam<P>
impl<P> Sync for GenericParam<P>
impl<P> Unpin for GenericParam<P>
impl<P> UnsafeUnpin for GenericParam<P>
impl<P> UnwindSafe for GenericParam<P>
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