Struct SshService
pub struct SshService {
pub(crate) port: u16,
}Expand description
Service providing SSH over a remote tunnel.
Two methods Self::source and Self::destination are provided for
quickstart.
You can use a different port by creating your own instance:
let service = SshService::with_port(2222);The source side port can be chosen arbitrarily, however the destination side
port needs to match the port on which sshd is running.
Fields§
§port: u16Implementations§
§impl SshService
impl SshService
pub const fn source() -> Self
pub const fn source() -> Self
Creates an SSH service for the source side of the service.
Port arbitrarily set to 8022.
pub const fn destination() -> Self
pub const fn destination() -> Self
Creates an SSH service for the destination side of the service.
Port set to 22, the default SSH port.
Trait Implementations§
§impl Clone for SshService
impl Clone for SshService
§fn clone(&self) -> SshService
fn clone(&self) -> SshService
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 more§impl Debug for SshService
impl Debug for SshService
§impl Service for SshService
impl Service for SshService
impl Copy for SshService
Auto Trait Implementations§
impl Freeze for SshService
impl RefUnwindSafe for SshService
impl Send for SshService
impl Sync for SshService
impl Unpin for SshService
impl UnwindSafe for SshService
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