≈ the.bay.news

A niche exception to dyn Trait: Trait

The Rust Programming Language Forum
A niche exception to dyn Trait: Trait
hi! I am trying to understand this example from: dyn Trait implementations - Learning Rust Does the trait bound on Iteratable mean that Self should impl IntoIterator, and, if there's any lifetime with Self, then that lifetime should be the same as the lifetime on items yielded by IntoIterator? trait Iterable where for<'a> &'a Self: IntoIterator< Item = &'a <Self as Iterable>::Borrow, >, { type Borrow; fn iter(&self) -> Box<dyn Iterator<Item = &Self::Borrow> + '_> { ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.