torrust_tracker_deployer_lib/adapters/lxd/instance/info.rs
1//! LXD instance information structures
2//!
3//! This module provides the `InstanceInfo` struct which contains runtime information
4//! about LXD instances, including their names and network configuration.
5//!
6//! ## Key Features
7//!
8//! - Instance name and IP address tracking
9//! - Optional IP address handling for instances that may not have network connectivity
10//! - Integration with instance name validation
11//! - Support for both containers and virtual machines
12//!
13//! The instance information is typically retrieved from LXD list commands and used
14//! for connecting to and managing deployed instances.
15
16use std::net::IpAddr;
17
18use crate::domain::InstanceName;
19
20/// Instance information from LXD
21#[derive(Debug, Clone, PartialEq)]
22pub struct InstanceInfo {
23 pub name: InstanceName,
24 pub ip_address: Option<IpAddr>,
25}