pub struct HostTunnelOptsBuilder { /* private fields */ }
Expand description
Builder for HostTunnelOpts
.
Implementations§
Source§impl HostTunnelOptsBuilder
impl HostTunnelOptsBuilder
Sourcepub fn native<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn native<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Map each service port to the same port on the host, as if the service were running natively. Note: enabling may result in port conflicts.
Sourcepub fn ports<VALUE: Into<Vec<PortForward>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn ports<VALUE: Into<Vec<PortForward>>>( &mut self, value: VALUE, ) -> &mut Self
Configure explicit port forwarding rules for the tunnel. If a port’s frontend is unspecified or 0, a random port will be chosen by the host. If no ports are given, all of the service’s ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host. If ports are given and native is true, the ports are additive.
Sourcepub fn build(&self) -> Result<HostTunnelOpts, HostTunnelOptsBuilderError>
pub fn build(&self) -> Result<HostTunnelOpts, HostTunnelOptsBuilderError>
Trait Implementations§
Source§impl Clone for HostTunnelOptsBuilder
impl Clone for HostTunnelOptsBuilder
Source§fn clone(&self) -> HostTunnelOptsBuilder
fn clone(&self) -> HostTunnelOptsBuilder
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for HostTunnelOptsBuilder
impl RefUnwindSafe for HostTunnelOptsBuilder
impl Send for HostTunnelOptsBuilder
impl Sync for HostTunnelOptsBuilder
impl Unpin for HostTunnelOptsBuilder
impl UnwindSafe for HostTunnelOptsBuilder
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