pub struct FirecrackerExecutorBuilder { /* private fields */ }
Implementations§
Source§impl FirecrackerExecutorBuilder
impl FirecrackerExecutorBuilder
pub fn new() -> FirecrackerExecutorBuilder
Sourcepub fn determine_binary_location() -> Result<PathBuf, BuilderError>
pub fn determine_binary_location() -> Result<PathBuf, BuilderError>
Tries to determine firecracker
binary location, in case it cannot determine any binary it
will panic
It is based on multiple sources (top to bottom priority).
FIRECRACKER_LOCATION
environment variable: direct path to the binary$PATH
environment variable: search for the binary in the directoriesfirecracker
binary in the current working directory
Sourcepub fn auto() -> Result<FirecrackerExecutorBuilder, BuilderError>
pub fn auto() -> Result<FirecrackerExecutorBuilder, BuilderError>
Create a new firecracker executor, it will try to determine the binary location, but you can provide a custom one through several options (upper take priority over lower):
FIRECRACKER_LOCATION
environment variable: direct path to the binary$PATH
environment variable: search for the binary in the directoriesfirecracker
binary in the current working directory
If you provided a custom path to the binary and the binary doesn’t exist it will return BuilderError::BinaryNotFound.
If you don’t provide a directory to store firecracker
related files, it will use the
default one (“/srv”).
pub fn with_chroot(self, chroot: String) -> FirecrackerExecutorBuilder
pub fn with_exec_binary( self, exec_binary: PathBuf, ) -> FirecrackerExecutorBuilder
Trait Implementations§
Source§impl Builder<Executor> for FirecrackerExecutorBuilder
impl Builder<Executor> for FirecrackerExecutorBuilder
Auto Trait Implementations§
impl Freeze for FirecrackerExecutorBuilder
impl RefUnwindSafe for FirecrackerExecutorBuilder
impl Send for FirecrackerExecutorBuilder
impl Sync for FirecrackerExecutorBuilder
impl Unpin for FirecrackerExecutorBuilder
impl UnwindSafe for FirecrackerExecutorBuilder
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