Cargo Features
[dependencies]
cfdp-rs = { version = "0.2.0", default-features = false, features = ["std", "alloc", "serde", "defmt"] }
- default = std
-
The
std
feature is set by default whenevercfdp-rs
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
-
Enables std of spacepackets and thiserror
thiserror:
Std feature enables support for formatting std::path::{Path, PathBuf}
conveniently in an error message.
#[derive(Error, Debug)]
#[error("failed to create configuration file {path}")]
pub struct MyError {
pub path: PathBuf,
pub source: std::io::Error,
}
Without std, this would need to be written #[error("... {}", path.display())].Affects
dest::StdDestinationHandler
,filestore::std_mod
,cfdp-rs::GenericSendError
,cfdp-rs::PduSendProvider
,cfdp-rs::std_mod
… - alloc std = hashbrown
-
Enables alloc of spacepackets
Affects
cfdp-rs::dest
,cfdp-rs::source
,cfdp-rs::StdRemoteEntityConfigProvider
,cfdp-rs::VecRemoteEntityConfigProvider
,cfdp-rs::alloc_mod
,request::alloc_mod
,user::OwnedMetadataRecvdParams
… - serde
-
Enables serde, serde of hashbrown, serde of spacepackets
- defmt
-
Enables defmt, defmt of spacepackets
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.