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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)