[][src]Struct bootimage::builder::Builder

pub struct Builder { /* fields omitted */ }

Allows building the kernel and creating a bootable disk image with it.

Implementations

impl Builder[src]

pub fn new(manifest_path: Option<PathBuf>) -> Result<Self, BuilderError>[src]

Creates a new builder for the project at the given manifest path

If None is passed for manifest_path, it is automatically searched.

pub fn manifest_path(&self) -> &Path[src]

Returns the path to the Cargo.toml file of the project.

pub fn build_kernel(
    &mut self,
    args: &[String],
    config: &Config,
    quiet: bool
) -> Result<Vec<PathBuf>, BuildKernelError>
[src]

Builds the kernel by executing cargo build with the given arguments.

Returns a list of paths to all built executables. For crates with only a single binary, the returned list contains only a single element.

If the quiet argument is set to true, all output to stdout is suppressed.

pub fn create_bootimage(
    &mut self,
    kernel_manifest_path: &Path,
    bin_path: &Path,
    output_bin_path: &Path,
    quiet: bool
) -> Result<(), CreateBootimageError>
[src]

Creates a bootimage by combining the given kernel binary with the bootloader.

Places the resulting bootable disk image at the given output_bin_path.

If the quiet argument is set to true, all output to stdout is suppressed.

pub fn kernel_package_for_bin(
    &mut self,
    kernel_bin_name: &str
) -> Result<Option<&Package>, Error>
[src]

Returns the cargo metadata package that contains the given binary.

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

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.