pub struct Skeleton {
pub manifests: Vec<Manifest>,
pub config_file: Option<String>,
pub lock_file: Option<String>,
pub rust_toolchain_file: Option<(RustToolchainFile, String)>,
}Fields§
§manifests: Vec<Manifest>§config_file: Option<String>§lock_file: Option<String>§rust_toolchain_file: Option<(RustToolchainFile, String)>Implementations§
Source§impl Skeleton
impl Skeleton
Sourcepub fn derive<P: AsRef<Path>>(
base_path: P,
member: Option<String>,
) -> Result<Self, Error>
pub fn derive<P: AsRef<Path>>( base_path: P, member: Option<String>, ) -> Result<Self, Error>
Find all Cargo.toml files in base_path by traversing sub-directories recursively.
Sourcepub fn build_minimum_project(
&self,
base_path: &Path,
no_std: bool,
) -> Result<(), Error>
pub fn build_minimum_project( &self, base_path: &Path, no_std: bool, ) -> Result<(), Error>
Given the manifests in the current skeleton, create the minimum set of files required to
have a valid Rust project (i.e. write all manifests to disk and create dummy lib.rs,
main.rs and build.rs files where needed).
This function should be called on an empty canvas - i.e. an empty directory apart from the recipe file used to restore the skeleton.
Sourcepub fn remove_compiled_dummies<P: AsRef<Path>>(
&self,
base_path: P,
profile: OptimisationProfile,
target: Option<Vec<String>>,
target_dir: Option<PathBuf>,
) -> Result<(), Error>
pub fn remove_compiled_dummies<P: AsRef<Path>>( &self, base_path: P, profile: OptimisationProfile, target: Option<Vec<String>>, target_dir: Option<PathBuf>, ) -> Result<(), Error>
Scan the target directory and remove all compilation artifacts for libraries and build
scripts from the current workspace.
Given the usage of dummy lib.rs and build.rs files, keeping them around leads to funny
compilation errors.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Skeleton
impl<'de> Deserialize<'de> for Skeleton
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Skeleton
impl StructuralPartialEq for Skeleton
Auto Trait Implementations§
impl Freeze for Skeleton
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnsafeUnpin for Skeleton
impl UnwindSafe for Skeleton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more