pub struct Skeleton {
pub manifests: Vec<Manifest>,
pub config_file: Option<String>,
pub lock_file: Option<String>,
}
Fields
manifests: Vec<Manifest>
config_file: Option<String>
lock_file: Option<String>
Implementations
sourceimpl 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<String>,
target_dir: Option<PathBuf>
) -> Result<(), Error>
pub fn remove_compiled_dummies<P: AsRef<Path>>(
&self,
base_path: P,
profile: OptimisationProfile,
target: Option<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
sourceimpl<'de> Deserialize<'de> for Skeleton
impl<'de> Deserialize<'de> for Skeleton
sourcefn 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 StructuralEq for Skeleton
impl StructuralPartialEq for Skeleton
Auto Trait Implementations
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnwindSafe for Skeleton
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.