Struct cargo_gazelle::Field
source · pub struct Field<T> {
pub(crate) name: String,
pub(crate) value: T,
}
Expand description
A field within a Build rule, e.g. name = "foo"
.
use cargo_gazelle::{Field, List, QuotedString, ToBazelDefinition};
let deps: Field<List<QuotedString>> = Field::new(
"crate_features",
List::new(vec![QuotedString::new("json")],
));
assert_eq!(deps.to_bazel_definition(), "crate_features = [\"json\"],\n");
Fields§
§name: String
§value: T
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Field<T>where
T: Freeze,
impl<T> RefUnwindSafe for Field<T>where
T: RefUnwindSafe,
impl<T> Send for Field<T>where
T: Send,
impl<T> Sync for Field<T>where
T: Sync,
impl<T> Unpin for Field<T>where
T: Unpin,
impl<T> UnwindSafe for Field<T>where
T: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)