pub struct LanguageDef {
pub image: String,
pub run_cmd: String,
pub extension: String,
pub default_limits: ResourceLimits,
pub allow_network: bool,
}Expand description
单个语言的运行定义。语言名即 LANGUAGES 的 key,不再冗余存字段。
Fields§
§image: String容器镜像(task 12 的 docker build 产出,如 yggdrasil-runner-python:latest)。
run_cmd: String容器内执行命令(源码会注入到 /code/main.{ext})。
extension: String§default_limits: ResourceLimits§allow_network: bool该语言本身是否允许网络(与全局/请求级 allow_network 取与)。
Auto Trait Implementations§
impl Freeze for LanguageDef
impl RefUnwindSafe for LanguageDef
impl Send for LanguageDef
impl Sync for LanguageDef
impl Unpin for LanguageDef
impl UnsafeUnpin for LanguageDef
impl UnwindSafe for LanguageDef
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
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.