pub struct DepRequirement {
pub crate_name: &'static str,
pub version: &'static str,
pub features: Vec<&'static str>,
}Expand description
One crate the generated code needs in its Cargo.toml.
Fields§
§crate_name: &'static str§version: &'static str§features: Vec<&'static str>Implementations§
Source§impl DepRequirement
impl DepRequirement
pub fn new(crate_name: &'static str, version: &'static str) -> Self
pub fn with_features(self, features: &[&'static str]) -> Self
Sourcepub fn to_toml_line(&self) -> String
pub fn to_toml_line(&self) -> String
Render as a single TOML [dependencies] line. Picks the
most compact form that still expresses the required features.
Trait Implementations§
Source§impl Clone for DepRequirement
impl Clone for DepRequirement
Source§fn clone(&self) -> DepRequirement
fn clone(&self) -> DepRequirement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DepRequirement
impl Debug for DepRequirement
impl Eq for DepRequirement
Source§impl PartialEq for DepRequirement
impl PartialEq for DepRequirement
impl StructuralPartialEq for DepRequirement
Auto Trait Implementations§
impl Freeze for DepRequirement
impl RefUnwindSafe for DepRequirement
impl Send for DepRequirement
impl Sync for DepRequirement
impl Unpin for DepRequirement
impl UnsafeUnpin for DepRequirement
impl UnwindSafe for DepRequirement
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.