pub trait Service {
    type Output;

    // Required method
    fn connect(&mut self, channel: Channel) -> Option<Self::Output>;
}
Expand description

Service connects channels to service instances.

Note that this trait is implemented by the FidlService type.

Required Associated Types§

source

type Output

The type of the value yielded by the spawn_service callback.

Required Methods§

source

fn connect(&mut self, channel: Channel) -> Option<Self::Output>

Create a new instance of the service on the provided zx::Channel.

The value returned by this function will be yielded from the stream output of the ServiceFs type.

Implementors§

source§

impl<F, O> Service for F
where F: FnMut(Channel) -> Option<O>,

§

type Output = O

source§

impl<F, P, Output> Service for FidlServiceServerConnector<F, P, Output>
where F: FnMut(ServerEnd<P>) -> Output, P: DiscoverableProtocolMarker,

§

type Output = Output

source§

impl<F, RS, Output> Service for FidlService<F, RS, Output>
where F: FnMut(RS) -> Output, RS: RequestStream,

§

type Output = Output

source§

impl<F, SR, Output> Service for FidlServiceMember<F, SR, Output>
where F: FnMut(SR) -> Output, SR: ServiceRequest,

§

type Output = Output