Trait fuchsia_component::server::ServiceObjTrait

source ·
pub trait ServiceObjTrait {
    type Output;

    // Required method
    fn service(&mut self) -> &mut dyn Service<Output = Self::Output>;
}
Expand description

A trait implemented by both ServiceObj and ServiceObjLocal that allows code to be generic over thread-safety.

Code that uses ServiceObj will require Send bounds but will be multithreaded-capable, while code that uses ServiceObjLocal will allow non-Send types but will be restricted to singlethreaded executors.

Required Associated Types§

source

type Output

The output type of the underlying Service.

Required Methods§

source

fn service(&mut self) -> &mut dyn Service<Output = Self::Output>

Get a mutable reference to the underlying Service trait object.

Implementors§

source§

impl<'a, Output> ServiceObjTrait for ServiceObj<'a, Output>

§

type Output = Output

source§

impl<'a, Output> ServiceObjTrait for ServiceObjLocal<'a, Output>

§

type Output = Output