/// This is similar to [register_fidl_service], but instead of managing the
/// instantiation of the service using the defaults, the client instantiates
/// this service instance. This is useful if the client wants to have access
/// to some inner state for testing like a channel.
This is similar to [register_fidl_service], but instead of managing the
instantiation of the service using the defaults, the client instantiates
this service instance. This is useful if the client wants to have access
to some inner state for testing like a channel.
This is similar to [ register_fidl_service ] but instead of managing the instantiation of the service using the defaults the client instantiates this service instance . This is useful if the client wants to have access to some inner state for testing like a channel .
pub fn inject_fidl_service<F: FidlService>(mut self, svc: Rc<RefCell<F>>) -> Self
    where
        F: 'static,
    {
        if let Some(_) = self
            .map
            .insert(F::Service::PROTOCOL_NAME.to_owned(), Box::new(InjectedStreamHandler::new(svc)))
        {
            panic!("duplicate service registered under: {}", F::Service::PROTOCOL_NAME);
        }
        self
    }
pub fn inject_fidl_service < F : FidlService > ( mut self , svc : Rc < RefCell < F > > ) -> Self where F : ' static , { if let Some ( _ ) = self . map . insert ( F :: Service :: PROTOCOL_NAME . to_owned ( ) , Box :: new ( InjectedStreamHandler :: new ( svc ) ) ) { panic ! ( " " F Service PROTOCOL_NAME ) ; } self }
This is similar to [register_fidl_service], but instead of managing the
instantiation of the service using the defaults, the client instantiates
this service instance.
This is similar to [ register_fidl_service ] but instead of managing the instantiation of the service using the defaults the client instantiates this service instance .
mut self
svc
Rc<RefCell<F>>