Ownit

Trait Ownit 

Source
pub trait Ownit {
    type OwnedSelf: 'static;

    // Required method
    fn into_static(self) -> Self::OwnedSelf;
}
Expand description

Trait akin to ToOwned but more general in practice.

Required Associated Types§

Source

type OwnedSelf: 'static

Owned version of self.

Generally this is going to be the type itself but with ’static lifetimes (e.g. Cow<'a, T> -> Cow<'static, T>)

Required Methods§

Source

fn into_static(self) -> Self::OwnedSelf

Makes an owned ('static) version of self

Implementations on Foreign Types§

Source§

impl Ownit for bool

Source§

impl Ownit for char

Source§

impl Ownit for f32

Source§

impl Ownit for f64

Source§

impl Ownit for i8

Source§

impl Ownit for i16

Source§

impl Ownit for i32

Source§

impl Ownit for i64

Source§

impl Ownit for i128

Source§

impl Ownit for isize

Source§

impl Ownit for u8

Source§

impl Ownit for u16

Source§

impl Ownit for u32

Source§

impl Ownit for u64

Source§

impl Ownit for u128

Source§

impl Ownit for ()

Source§

impl Ownit for usize

Source§

impl Ownit for String

Source§

impl Ownit for AtomicI8

Source§

impl Ownit for AtomicI16

Source§

impl Ownit for AtomicI32

Source§

impl Ownit for AtomicI64

Source§

impl Ownit for AtomicIsize

Source§

impl Ownit for AtomicU8

Source§

impl Ownit for AtomicU16

Source§

impl Ownit for AtomicU32

Source§

impl Ownit for AtomicU64

Source§

impl Ownit for AtomicUsize

Source§

impl Ownit for Duration

Source§

impl Ownit for PathBuf

Source§

impl Ownit for Instant

Source§

impl Ownit for SystemTime

Source§

impl<T: ToOwned + ?Sized + 'static> Ownit for Cow<'_, T>

Source§

type OwnedSelf = Cow<'static, T>

Source§

fn into_static(self) -> Self::OwnedSelf

Source§

impl<T: Ownit + Clone> Ownit for Rc<T>

Source§

impl<T: Ownit> Ownit for Option<T>

Source§

impl<T: Ownit> Ownit for Box<T>

Source§

impl<T: Ownit> Ownit for Vec<T>

Source§

impl<T: Ownit, E: Ownit> Ownit for Result<T, E>

Source§

impl<const N: usize, T: Ownit> Ownit for [T; N]

Source§

type OwnedSelf = [<T as Ownit>::OwnedSelf; N]

Source§

fn into_static(self) -> Self::OwnedSelf

Implementors§