pub struct CargoToml {
pub manifest: DocumentMut,
}Fields§
§manifest: DocumentMutImplementations§
Source§impl CargoToml
impl CargoToml
pub fn load(manifest: &str) -> Result<Self, Box<dyn Error>>
pub fn is_published(&self) -> bool
pub fn version(&self) -> &str
pub fn msrv(&self) -> &str
Sourcepub fn visit_dependencies(
&self,
handle_dependencies: impl FnMut(&str, &'static str, &Table),
)
pub fn visit_dependencies( &self, handle_dependencies: impl FnMut(&str, &'static str, &Table), )
Calls a callback for each table that contains dependencies.
Callback arguments:
path: The path to the table (e.g.dependencies.package)dependency_kind: The kind of dependency (e.g.dependencies,dev-dependencies)table: The table itself
pub fn dependency_version(&self, package_name: &str) -> String
Auto Trait Implementations§
impl Freeze for CargoToml
impl RefUnwindSafe for CargoToml
impl Send for CargoToml
impl Sync for CargoToml
impl Unpin for CargoToml
impl UnsafeUnpin for CargoToml
impl UnwindSafe for CargoToml
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more