pub struct Dependency {
pub group_id: String,
pub artifact_id: String,
pub version: Option<Property>,
pub depend_type: Option<String>,
pub scope: Option<String>,
pub classifier: Option<String>,
}
Expand description
A dependency in a pom file.
Fields§
§group_id: String
The group id of the dependency.
<groupId>com.google.guava</groupId>
artifact_id: String
The artifact id of the dependency.
<artifactId>guava</artifactId>
version: Option<Property>
The version of the dependency.
<version>1.0.0</version>
depend_type: Option<String>
The type of the dependency.
<type>jar</type>
scope: Option<String>
§classifier: Option<String>
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn is_same_dependency(&self, other: &Dependency) -> bool
pub fn is_same_dependency(&self, other: &Dependency) -> bool
Checks if the dependency is the same as the other dependency.
Basically, it checks if the group id and artifact id are the same.
pub fn pom_name(&self) -> String
pub fn pom_path(&self) -> String
Trait Implementations§
Source§impl ChildOfListElement for Dependency
impl ChildOfListElement for Dependency
fn parent_element_name() -> &'static str
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 moreSource§impl ComparableElement for Dependency
impl ComparableElement for Dependency
Source§fn is_same_item(&self, other: &Self) -> bool
fn is_same_item(&self, other: &Self) -> bool
Checks if the current element is the same as the other element.
Some implementations may only check a subset of fields. Such as Dependency only checking the group id and artifact id.
Source§impl Debug for Dependency
impl Debug for Dependency
Source§impl Default for Dependency
impl Default for Dependency
Source§fn default() -> Dependency
fn default() -> Dependency
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Dependency
impl<'de> Deserialize<'de> for Dependency
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Dependency
impl Display for Dependency
Source§impl ElementConverter for Dependency
impl ElementConverter for Dependency
Source§fn from_element(
element: Element,
document: &Document,
) -> Result<Self, XMLEditorError>
fn from_element( element: Element, document: &Document, ) -> Result<Self, XMLEditorError>
Converts an [Element] to the specific type.
Source§fn into_children(
self,
document: &mut Document,
) -> Result<Vec<Element>, XMLEditorError>
fn into_children( self, document: &mut Document, ) -> Result<Vec<Element>, XMLEditorError>
Creates all children of the current type.
Source§fn into_element(
self,
document: &mut Document,
) -> Result<Element, XMLEditorError>where
Self: HasElementName,
fn into_element(
self,
document: &mut Document,
) -> Result<Element, XMLEditorError>where
Self: HasElementName,
Creates an [Element] from the current type. Read more
Source§impl FromStr for Dependency
impl FromStr for Dependency
Source§impl HasElementName for Dependency
impl HasElementName for Dependency
Source§fn element_name() -> &'static str
fn element_name() -> &'static str
The name of the element.
Source§impl PartialEq for Dependency
impl PartialEq for Dependency
Source§impl Serialize for Dependency
impl Serialize for Dependency
Source§impl TryFrom<&str> for Dependency
impl TryFrom<&str> for Dependency
Source§impl TryFrom<String> for Dependency
impl TryFrom<String> for Dependency
Source§impl UpdatableElement for Dependency
impl UpdatableElement for Dependency
fn update_element( &self, element: Element, document: &mut Document, ) -> Result<(), XMLEditorError>
Source§fn replace_all_elements(
self,
element: Element,
document: &mut Document,
) -> Result<(), XMLEditorError>
fn replace_all_elements( self, element: Element, document: &mut Document, ) -> Result<(), XMLEditorError>
Replaces all children of the element with the children of the current element.
impl Eq for Dependency
impl StructuralPartialEq for Dependency
Auto 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