Struct fidl_connector::ServiceReconnector
source · pub struct ServiceReconnector<P>where
P: DiscoverableProtocolMarker,
<P as ProtocolMarker>::Proxy: Clone,{ /* private fields */ }
Expand description
A Connect
implementation that will try to reconnect to a FIDL service if the channel has
received a peer closed signal. This means it is possible ServiceReconnector
to return a
closed channel, but it should eventually reconnect once the FIDL service is restarted.
Implementations§
source§impl<P> ServiceReconnector<P>where
P: DiscoverableProtocolMarker,
<P as ProtocolMarker>::Proxy: Clone,
impl<P> ServiceReconnector<P>where P: DiscoverableProtocolMarker, <P as ProtocolMarker>::Proxy: Clone,
sourcepub fn new() -> Self
pub fn new() -> Self
Return a FIDL service connector at the default service directory in the application’s root namespace.
sourcepub fn with_service_at(service_directory_path: &str) -> Self
pub fn with_service_at(service_directory_path: &str) -> Self
Return a FIDL service connector at the specified service directory in the application’s root namespace.
The service directory path must be an absolute path.
sourcepub fn with_service_at_path<S: Into<String>>(service_path: S) -> Self
pub fn with_service_at_path<S: Into<String>>(service_path: S) -> Self
Return a FIDL service connector at the specified service path.
Trait Implementations§
source§impl<P> Clone for ServiceReconnector<P>where
P: DiscoverableProtocolMarker + Clone,
<P as ProtocolMarker>::Proxy: Clone,
impl<P> Clone for ServiceReconnector<P>where P: DiscoverableProtocolMarker + Clone, <P as ProtocolMarker>::Proxy: Clone,
source§fn clone(&self) -> ServiceReconnector<P>
fn clone(&self) -> ServiceReconnector<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P> Connect for ServiceReconnector<P>where
P: DiscoverableProtocolMarker,
<P as ProtocolMarker>::Proxy: Clone,
impl<P> Connect for ServiceReconnector<P>where P: DiscoverableProtocolMarker, <P as ProtocolMarker>::Proxy: Clone,
Auto Trait Implementations§
impl<P> !RefUnwindSafe for ServiceReconnector<P>
impl<P> Send for ServiceReconnector<P>
impl<P> Sync for ServiceReconnector<P>
impl<P> Unpin for ServiceReconnector<P>
impl<P> !UnwindSafe for ServiceReconnector<P>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more