Struct cargo_gazelle::config::CommonConfig
source · pub struct CommonConfig {
skip: bool,
compile_data: Vec<String>,
data: Vec<String>,
rustc_flags: Vec<String>,
rustc_env: BTreeMap<String, String>,
}
Expand description
Extra config that is common among all target types.
Fields§
§skip: bool
Skip generating this target.
compile_data: Vec<String>
Paths that will be added to the compile_data
field of the generated Bazel target.
data: Vec<String>
Paths that will be added to the data
field of the generated Bazel target.
rustc_flags: Vec<String>
Extra flags that should be passed to the Rust compiler.
rustc_env: BTreeMap<String, String>
Set of environment variables to set for the Rust compiler.
Implementations§
source§impl CommonConfig
impl CommonConfig
pub fn skip(&self) -> bool
sourcepub fn compile_data(&self) -> (Vec<&String>, Option<Vec<&String>>)
pub fn compile_data(&self) -> (Vec<&String>, Option<Vec<&String>>)
Returns a tuple of (<non-glob paths>, <glob paths, if any>)
.
sourcepub fn data(&self) -> (Vec<&String>, Option<Vec<&String>>)
pub fn data(&self) -> (Vec<&String>, Option<Vec<&String>>)
Returns a tuple of (<non-glob paths>, <glob paths, if any>)
.
pub fn rustc_flags(&self) -> &[String]
pub fn rustc_env(&self) -> &BTreeMap<String, String>
Trait Implementations§
source§impl Debug for CommonConfig
impl Debug for CommonConfig
source§impl Default for CommonConfig
impl Default for CommonConfig
source§fn default() -> CommonConfig
fn default() -> CommonConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CommonConfig
impl<'de> Deserialize<'de> for CommonConfig
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
Auto Trait Implementations§
impl Freeze for CommonConfig
impl RefUnwindSafe for CommonConfig
impl Send for CommonConfig
impl Sync for CommonConfig
impl Unpin for CommonConfig
impl UnwindSafe for CommonConfig
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