EndpointParameter

Trait EndpointParameter 

Source
pub trait EndpointParameter<E> {
    // Required method
    fn into_arc(self) -> Arc<E>;
}
Expand description

trait to allow both &E and std::sync::Arc<E> as parameters for endpoints we can not just use Into because that tries to treat &Endpoint as the value E and screws up our other trait bounds

if we just used Arc the users would have to change all old call sites

Required Methods§

Source

fn into_arc(self) -> Arc<E>

convert the endpoint parameter into an Arc

Implementations on Foreign Types§

Source§

impl<E> EndpointParameter<E> for &E
where E: Clone,

Source§

fn into_arc(self) -> Arc<E>

Source§

impl<E> EndpointParameter<E> for Arc<E>

Source§

fn into_arc(self) -> Arc<E>

Implementors§