[−][src]Struct ttcore::Env
描述一个环境实例
Implementations
impl Env
[src]
pub fn new(serv: &Arc<Serv>, id: &EnvIdRef) -> Result<Env>
[src]
创建新的 Env 实例, 内部自动生成 ID
pub fn update_life(&mut self, secs: u64, is_fucker: bool) -> Result<()>
[src]
更新已有实例的生命周期
pub fn update_hardware(
&mut self,
cpu_num: Option<u32>,
mem_size: Option<u32>,
disk_size: Option<u32>,
vm_port: &[Port],
deny_outgoing: Option<bool>
) -> Result<()>
[src]
&mut self,
cpu_num: Option<u32>,
mem_size: Option<u32>,
disk_size: Option<u32>,
vm_port: &[Port],
deny_outgoing: Option<bool>
) -> Result<()>
更新已有实例的硬件配置
除只更新端口的情况以外, 须检查:
- ENV 必须处于 stop 状态
- 系统资源足以支掌新的配置
pub fn add_vm_set(&mut self, cfg_set: Vec<VmCfg>) -> Result<()>
[src]
批量创建 Vm 实例
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl !UnwindSafe for Env
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,