pub struct ServiceConnector<'incoming, ServiceProxy> { /* private fields */ }Expand description
A builder for connecting to an aggregated service instance in the driver’s incoming namespace.
By default, it will connect to the default instance, named default. You can override this
by calling Self::instance.
Implementations§
Source§impl<'a, S> ServiceConnector<'a, S>
impl<'a, S> ServiceConnector<'a, S>
Sourcepub fn instance(self, instance: &'a str) -> Self
pub fn instance(self, instance: &'a str) -> Self
Overrides the instance name to connect to when Self::connect is called.
Source§impl<'a, S: ServiceProxy> ServiceConnector<'a, S>where
S::Service: ServiceMarker,
impl<'a, S: ServiceProxy> ServiceConnector<'a, S>where
S::Service: ServiceMarker,
Source§impl<'a, S: Service<ServiceMemberConnector>> ServiceConnector<'a, ServiceInstance<S>>
impl<'a, S: Service<ServiceMemberConnector>> ServiceConnector<'a, ServiceInstance<S>>
Sourcepub fn connect_next(self) -> Result<ServiceInstance<S>, Status>
pub fn connect_next(self) -> Result<ServiceInstance<S>, Status>
Connects to the service instance’s path in the incoming namespace with the new wire bindings.
Logs and returns a [Status::CONNECTION_REFUSED] if the service instance couldn’t be opened.
Auto Trait Implementations§
impl<'incoming, ServiceProxy> Freeze for ServiceConnector<'incoming, ServiceProxy>
impl<'incoming, ServiceProxy> RefUnwindSafe for ServiceConnector<'incoming, ServiceProxy>where
ServiceProxy: RefUnwindSafe,
impl<'incoming, ServiceProxy> Send for ServiceConnector<'incoming, ServiceProxy>where
ServiceProxy: Send,
impl<'incoming, ServiceProxy> Sync for ServiceConnector<'incoming, ServiceProxy>where
ServiceProxy: Sync,
impl<'incoming, ServiceProxy> Unpin for ServiceConnector<'incoming, ServiceProxy>where
ServiceProxy: Unpin,
impl<'incoming, ServiceProxy> UnwindSafe for ServiceConnector<'incoming, ServiceProxy>where
ServiceProxy: UnwindSafe,
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to Self§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more