@@ -38,7 +38,7 @@ pub type EnumeratedProperties<'a> = (Vec<(bool, Entity<'a>, Entity<'a>)>, Consum
38
38
/// (vec![known_elements], rest, dep)
39
39
pub type IteratedElements < ' a > = ( Vec < Entity < ' a > > , Option < Entity < ' a > > , Consumable < ' a > ) ;
40
40
41
- pub trait EntityTrait < ' a > : ConsumableTrait < ' a > {
41
+ pub trait ValueTrait < ' a > : ConsumableTrait < ' a > {
42
42
/// Returns true if the entity is completely consumed
43
43
fn consume_mangable ( & ' a self , analyzer : & mut Analyzer < ' a > ) -> bool {
44
44
self . consume ( analyzer) ;
@@ -200,13 +200,13 @@ pub trait EntityTrait<'a>: ConsumableTrait<'a> {
200
200
}
201
201
}
202
202
203
- impl < ' a , T : EntityTrait < ' a > + ' a + ?Sized > ConsumableTrait < ' a > for & ' a T {
203
+ impl < ' a , T : ValueTrait < ' a > + ' a + ?Sized > ConsumableTrait < ' a > for & ' a T {
204
204
fn consume ( & self , analyzer : & mut Analyzer < ' a > ) {
205
205
( * self ) . consume ( analyzer)
206
206
}
207
207
}
208
208
209
- pub type Value < ' a > = & ' a ( dyn EntityTrait < ' a > + ' a ) ;
209
+ pub type Value < ' a > = & ' a ( dyn ValueTrait < ' a > + ' a ) ;
210
210
211
211
#[ derive( Debug , Clone , Copy ) ]
212
212
pub struct Entity < ' a > {
@@ -418,12 +418,12 @@ impl<'a> ConsumableTrait<'a> for Entity<'a> {
418
418
}
419
419
}
420
420
421
- impl < ' a , T : EntityTrait < ' a > + ' a > From < & ' a T > for Entity < ' a > {
421
+ impl < ' a , T : ValueTrait < ' a > + ' a > From < & ' a T > for Entity < ' a > {
422
422
fn from ( value : & ' a T ) -> Self {
423
423
Entity { value, dep : None }
424
424
}
425
425
}
426
- impl < ' a , T : EntityTrait < ' a > + ' a > From < & ' a mut T > for Entity < ' a > {
426
+ impl < ' a , T : ValueTrait < ' a > + ' a > From < & ' a mut T > for Entity < ' a > {
427
427
fn from ( value : & ' a mut T ) -> Self {
428
428
( & * value) . into ( )
429
429
}
0 commit comments