pub struct LifetimeTransitivity<'env> { /* private fields */ }Expand description
Collect all lifetimes that are either longer_or_shorter
Implementations§
Source§impl<'env> LifetimeTransitivity<'env>
impl<'env> LifetimeTransitivity<'env>
Sourcepub fn longer(env: &'env LifetimeEnv) -> Self
pub fn longer(env: &'env LifetimeEnv) -> Self
Returns a new LifetimeTransitivity that finds all longer lifetimes.
Sourcepub fn shorter(env: &'env LifetimeEnv) -> Self
pub fn shorter(env: &'env LifetimeEnv) -> Self
Returns a new LifetimeTransitivity that finds all shorter lifetimes.
Sourcepub fn longer_than(
env: &'env LifetimeEnv,
named: &NamedLifetime,
) -> Vec<&'env NamedLifetime>
pub fn longer_than( env: &'env LifetimeEnv, named: &NamedLifetime, ) -> Vec<&'env NamedLifetime>
Returns all the lifetimes longer than a provided NamedLifetime.
Sourcepub fn shorter_than(
env: &'env LifetimeEnv,
named: &NamedLifetime,
) -> Vec<&'env NamedLifetime>
pub fn shorter_than( env: &'env LifetimeEnv, named: &NamedLifetime, ) -> Vec<&'env NamedLifetime>
Returns all the lifetimes shorter than the provided NamedLifetime.
Sourcepub fn visit(&mut self, named: &NamedLifetime)
pub fn visit(&mut self, named: &NamedLifetime)
Visits a lifetime, as well as all the nodes it’s transitively longer or
shorter than, depending on how the LifetimeTransitivity was constructed.
Sourcepub fn finish(self) -> Vec<&'env NamedLifetime>
pub fn finish(self) -> Vec<&'env NamedLifetime>
Returns the transitively reachable lifetimes.
Auto Trait Implementations§
impl<'env> Freeze for LifetimeTransitivity<'env>
impl<'env> RefUnwindSafe for LifetimeTransitivity<'env>
impl<'env> Send for LifetimeTransitivity<'env>
impl<'env> Sync for LifetimeTransitivity<'env>
impl<'env> Unpin for LifetimeTransitivity<'env>
impl<'env> UnwindSafe for LifetimeTransitivity<'env>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 64 bytes