Skip to main content

WithName

Trait WithName 

Source
pub trait WithName {
    // Required method
    fn with_name_and_kind(self, name: Option<&str>, kind: Option<&str>) -> Self;

    // Provided methods
    fn with_name(self, name: &str) -> Self
       where Self: Sized { ... }
    fn with_kind(self, kind: &str) -> Self
       where Self: Sized { ... }
}
Expand description

Trait to record information about shared objects, such as their name and type. See implementation in crate::future::batch_semaphore::BatchSemaphore, which actually records the name into the schedule, other types should forward calls into their underlying primitive, as in shuttle::sync::Mutex.

Required Methods§

Source

fn with_name_and_kind(self, name: Option<&str>, kind: Option<&str>) -> Self

Set the name and kind (full type path) of this object.

Provided Methods§

Source

fn with_name(self, name: &str) -> Self
where Self: Sized,

Set the name of this object.

Source

fn with_kind(self, kind: &str) -> Self
where Self: Sized,

Set the kind (full type path) of this object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§