[][src]Struct ppserver::cfg::Cfg

pub struct Cfg {
    pub log_path: Option<String>,
    pub serv_ip: String,
    pub serv_at: String,
    pub image_path: String,
    pub cpu_total: u32,
    pub mem_total: u32,
    pub disk_total: u32,
}

配置信息

Fields

log_path: Option<String>

日志存储路径

serv_ip: String

eg: '192.168.3.22'

serv_at: String

服务地址和端口, eg: '192.168.3.22:9527'

image_path: String

Linux

基础镜像的存放路径, 文件名称必须以 .qcow2 结尾, 同时也是服务进程的工作路径; 需要可写权限, tap.sh 会创建在此路径下, Vm 镜像也会创建在相同的跟径下

FreeBSD

使用 ZFS 卷, 不需要写权限

cpu_total: u32

CPU 核心总数

mem_total: u32

Mem 总容量, 单位: MB

disk_total: u32

Disk 总容量, 单位: MB

Trait Implementations

impl Debug for Cfg[src]

Auto Trait Implementations

impl RefUnwindSafe for Cfg

impl Send for Cfg

impl Sync for Cfg

impl Unpin for Cfg

impl UnwindSafe for Cfg

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.