InCtxDyn
				
					
				
			This commit is contained in:
		
							parent
							
								
									f86c6edf9f
								
							
						
					
					
						commit
						b5862b45fd
					
				| @ -111,6 +111,23 @@ impl<I: Inlining> InliningDyn for I { | |||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | pub trait InCtxDyn<'a, Ctx: Context<'a>>: InliningDyn { | ||||||
|  |     fn icdnext_address(self) -> Result<(Address, Box<Self>), Vec<u8>>; | ||||||
|  | 
 | ||||||
|  |     fn idresolver(&self) -> Rc<dyn Resolver<'a, Ctx>>; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | impl<'a, Ctx: Context<'a>, I: InCtx<'a, Ctx>> InCtxDyn<'a, Ctx> for I { | ||||||
|  |     fn icdnext_address(self) -> Result<(Address, Box<Self>), Vec<u8>> { | ||||||
|  |         let (address, i) = self.icnext_address(|slice| Vec::from(slice))?; | ||||||
|  |         Ok((address, i.into())) | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     fn idresolver(&self) -> Rc<dyn Resolver<'a, Ctx>> { | ||||||
|  |         self.iresolver() | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| pub type IParseResult<'a, Ctx, F, I> = | pub type IParseResult<'a, Ctx, F, I> = | ||||||
|     Result<(Mtbl<'a, Ctx, F>, I), <F as Factory<'a, Ctx>>::ParseError>; |     Result<(Mtbl<'a, Ctx, F>, I), <F as Factory<'a, Ctx>>::ParseError>; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user