pub struct Dependency { /* private fields */ }
Expand description
A dependency to apply to the code
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn workspace(name: impl Display) -> Self
pub fn workspace(name: impl Display) -> Self
Create a dependency using the workspace dependency
Sourcepub fn path(name: impl Display, path: impl Display) -> Self
pub fn path(name: impl Display, path: impl Display) -> Self
Create a dependency using a path to the crate root, relative to the root of the current package.
Sourcepub fn version(name: impl Display, version: impl Display) -> Self
pub fn version(name: impl Display, version: impl Display) -> Self
Create a dependency using a name and version from crates.io
Sourcepub fn default_features(self, default_features: bool) -> Self
pub fn default_features(self, default_features: bool) -> Self
Toggle the default features flag
Trait Implementations§
Source§impl Clone for Dependency
impl Clone for Dependency
Source§fn clone(&self) -> Dependency
fn clone(&self) -> Dependency
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
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