Trait discrimination::split_either::Sharing [] [src]

pub trait Sharing<T: ?Sized> {
    type Shared: Clone;
    fn create(v: T) -> Self::Shared
    where
        T: Sized
; fn modify<R, F>(this: &Self::Shared, f: F) -> R
    where
        F: FnMut(&mut T) -> R
; fn inspect<R, F>(this: &Self::Shared, f: F) -> R
    where
        F: FnMut(&T) -> R
; }

Associated Types

Required Methods

Implementors