pub struct SigConstraint {
pub kw: ConstraintTok,
pub tyvar: TypeVarTok,
pub cons: ConsTok,
pub kind: RecordKind,
}Expand description
One constrnt: constraint 'a :: (| l1 : ty1; l2 : ty2; … |)
(parser.mly:526-530), a per-item suffix binding that item’s type
variable to a row-kind obligation — not a standalone SigItem (a
reader expecting the latter should see this doc: upstream attaches
constrnts to SigValue/SigDirect/SigType directly, so the suffix
form here is the faithful one and avoids an ambiguous “which item does
this constrain?”).
Fields§
§kw: ConstraintTok§tyvar: TypeVarTok§cons: ConsTok§kind: RecordKindTrait Implementations§
Source§impl Clone for SigConstraint
impl Clone for SigConstraint
Source§fn clone(&self) -> SigConstraint
fn clone(&self) -> SigConstraint
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 SigConstraint
impl Debug for SigConstraint
Source§impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for SigConstraintwhere
__SyanMacro_Atom: Spanned + Clone,
ConstraintTok: Parse<__SyanMacro_Atom>,
TypeVarTok: Parse<__SyanMacro_Atom>,
ConsTok: Parse<__SyanMacro_Atom>,
RecordKind: Parse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Parse<__SyanMacro_Atom> for SigConstraintwhere
__SyanMacro_Atom: Spanned + Clone,
ConstraintTok: Parse<__SyanMacro_Atom>,
TypeVarTok: Parse<__SyanMacro_Atom>,
ConsTok: Parse<__SyanMacro_Atom>,
RecordKind: Parse<__SyanMacro_Atom>,
Source§type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
type Error = ParseError<<__SyanMacro_Atom as Spanned>::Span>
Every error must be convertible to the universal one, so a field’s failure can become the
enclosing type’s failure with no per-field where-predicate. Stating it HERE rather than at
each derived impl is what keeps it out of the obligation graph: a per-field
<FieldTy as Parse<Atom>>::Error: Into<…> predicate re-creates a projection cycle on a
recursive field (E0275), which decycle’s bound-peeling does not break.Source§fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>(
__syan_stream: &mut __SyanMacro_S,
) -> Result<Self, Self::Error>
fn parse_stream<__SyanMacro_S: ParseStream<Atom = __SyanMacro_Atom>>( __syan_stream: &mut __SyanMacro_S, ) -> Result<Self, Self::Error>
Parse from a reborrowable stream. Read more
Source§impl PartialEq for SigConstraint
impl PartialEq for SigConstraint
impl StructuralPartialEq for SigConstraint
Source§impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for SigConstraintwhere
ConstraintTok: Unparse<__SyanMacro_Atom>,
TypeVarTok: Unparse<__SyanMacro_Atom>,
ConsTok: Unparse<__SyanMacro_Atom>,
RecordKind: Unparse<__SyanMacro_Atom>,
impl<__SyanMacro_Atom> Unparse<__SyanMacro_Atom> for SigConstraintwhere
ConstraintTok: Unparse<__SyanMacro_Atom>,
TypeVarTok: Unparse<__SyanMacro_Atom>,
ConsTok: Unparse<__SyanMacro_Atom>,
RecordKind: Unparse<__SyanMacro_Atom>,
Auto Trait Implementations§
impl Freeze for SigConstraint
impl RefUnwindSafe for SigConstraint
impl Send for SigConstraint
impl Sync for SigConstraint
impl Unpin for SigConstraint
impl UnsafeUnpin for SigConstraint
impl UnwindSafe for SigConstraint
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