Skip to main content

WithLifetime

Trait WithLifetime 

Source
pub trait WithLifetime:
    Send
    + Sync
    + 'static {
    type Of<'a>: Send + Sync;
}
Expand description

A utility 'static compatible trait adding a lifetime to a type.

Required Associated Types§

Source

type Of<'a>: Send + Sync

The associated type with a lifetime.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> WithLifetime for Slice<T>
where T: Send + Sync + 'static,

Source§

type Of<'a> = &'a [T]

Source§

impl<T> WithLifetime for Static<T>
where T: Send + Sync + 'static,

Source§

type Of<'a> = T