Skip to content

Instantly share code, notes, and snippets.

@Cynede
Created March 26, 2019 07:13
Show Gist options
  • Save Cynede/c05d85e201a4af3ef45fce011eccf1e3 to your computer and use it in GitHub Desktop.
Save Cynede/c05d85e201a4af3ef45fce011eccf1e3 to your computer and use it in GitHub Desktop.
pub struct Sess<'s> {
pub session: &'s ssh2::Session,
pub channel: ssh2::Channel<'s>
}
rental! {
pub mod rentals {
use super::*;
#[rental_mut]
pub struct SSHSession {
session_box: Box<ssh2::Session>,
sess: Sess<'session_box>,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment