pub struct Builder { /* private fields */ }Expand description
A builder type for Endpoints.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn service_name(&mut self, service_name: &str) -> &mut Builder
pub fn service_name(&mut self, service_name: &str) -> &mut Builder
Sets the service name associated with the endpoint.
Defaults to None.
Sourcepub fn ipv4(&mut self, ipv4: Ipv4Addr) -> &mut Builder
pub fn ipv4(&mut self, ipv4: Ipv4Addr) -> &mut Builder
Sets the IPv4 address associated with the endpoint.
Defaults to None.
Sourcepub fn ipv6(&mut self, ipv6: Ipv6Addr) -> &mut Builder
pub fn ipv6(&mut self, ipv6: Ipv6Addr) -> &mut Builder
Sets the IPv6 address associated with the endpoint.
Defaults to None.
Sourcepub fn ip(&mut self, ip: IpAddr) -> &mut Builder
pub fn ip(&mut self, ip: IpAddr) -> &mut Builder
Sets the IP address associated with the endpoint.
This is simply a convenience function which delegates to ipv4 and
ipv6.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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