Struct TunnelManager
pub struct TunnelManager {
pub(crate) task_tracker: TaskTracker,
pub(crate) cancel_guard: Option<DropGuard>,
}Fields§
§task_tracker: TaskTracker§cancel_guard: Option<DropGuard>Implementations§
§impl TunnelManager
impl TunnelManager
pub async fn new(mqtt: MqttClient, thing_name: &str) -> Result<Self, Error>
pub async fn new(mqtt: MqttClient, thing_name: &str) -> Result<Self, Error>
Runs a new tunnel service in response to a tunnel notification.
This function is spawned as a new task when a tunnel notification is
received. It creates a new Service instance and starts the tunnel
using the payload from the received MQTT packet.
§Arguments
mqtt- TheMqttClientinstance to use for the MQTT subscription.thing_name- The name of the AWS IoT thing to subscribe to.
pub async fn shutdown(&mut self)
pub async fn shutdown(&mut self)
Graceful shutdown of the tunnel manager.
Auto Trait Implementations§
impl Freeze for TunnelManager
impl RefUnwindSafe for TunnelManager
impl Send for TunnelManager
impl Sync for TunnelManager
impl Unpin for TunnelManager
impl UnwindSafe for TunnelManager
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