RefType

Trait RefType 

Source
pub trait RefType<T: RefTarget>:
    Clone
    + Debug
    + Eq
    + PartialEq
    + Serialize
    + DeserializeOwned
    + Display
    + Send
    + Sync
    + From<Self::Inner> {
    type Inner;

    // Required methods
    fn take(self) -> Self::Inner;
    fn inner(&self) -> &Self::Inner;
    fn not_found_error(&self) -> Error;
    fn already_exists_error(&self) -> Error;

    // Provided method
    fn short_type_name() -> &'static str { ... }
}

Required Associated Types§

Required Methods§

Source

fn take(self) -> Self::Inner

Source

fn inner(&self) -> &Self::Inner

Source

fn not_found_error(&self) -> Error

Source

fn already_exists_error(&self) -> Error

Provided Methods§

Source

fn short_type_name() -> &'static str

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§