fuchsia_component::server

Trait 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>

Source§

type Output = Output

Source§

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

Source§

type Output = Output