Struct hyperdriver::discovery::TransportBuilder
source · pub struct TransportBuilder { /* private fields */ }Available on crate feature
discovery only.Expand description
A builder for creating a RegistryTransport, by adding custom schemes.
Each scheme is a way to determine the service name from a request URI.
Implementations§
source§impl TransportBuilder
impl TransportBuilder
sourcepub fn add_scheme<S>(self, scheme: S) -> Self
pub fn add_scheme<S>(self, scheme: S) -> Self
Add a custom scheme to the transport.
sourcepub fn add_default_schemes(self) -> Self
pub fn add_default_schemes(self) -> Self
Add the default svc and grpc schemes to the transport.
sourcepub fn build(self) -> RegistryTransport
pub fn build(self) -> RegistryTransport
Build the RegistryTransport with the given service registry and schemes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransportBuilder
impl !RefUnwindSafe for TransportBuilder
impl Send for TransportBuilder
impl Sync for TransportBuilder
impl Unpin for TransportBuilder
impl !UnwindSafe for TransportBuilder
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