pub struct ProcessBackend { /* private fields */ }Expand description
Process-isolated plugin loader. 进程隔离插件加载器。
Implementations§
Source§impl ProcessBackend
impl ProcessBackend
Sourcepub const fn new(limits: ProcessLimits) -> Self
pub const fn new(limits: ProcessLimits) -> Self
Build a backend that applies limits to every loaded instance.
构造一个对每个已加载实例施加 limits 的后端。
Sourcepub fn load(
&self,
artifact: VerifiedPluginArtifact,
program: ProcessProgram,
) -> Result<ProcessInstance, HostError>
pub fn load( &self, artifact: VerifiedPluginArtifact, program: ProcessProgram, ) -> Result<ProcessInstance, HostError>
Stage the binary privately and require it to equal the artifact bytes. The returned instance runs that staged copy, so later edits to the original path cannot change what executes. 把二进制暂存到私有位置并要求它与工件字节相等。返回的实例运行该暂存副本, 因此之后改动原路径不会改变实际执行的内容。
Trait Implementations§
Source§impl Clone for ProcessBackend
impl Clone for ProcessBackend
impl Copy for ProcessBackend
Source§impl Debug for ProcessBackend
impl Debug for ProcessBackend
Auto Trait Implementations§
impl Freeze for ProcessBackend
impl RefUnwindSafe for ProcessBackend
impl Send for ProcessBackend
impl Sync for ProcessBackend
impl Unpin for ProcessBackend
impl UnsafeUnpin for ProcessBackend
impl UnwindSafe for ProcessBackend
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