pub struct Pom {
pub group_id: Option<String>,
pub artifact_id: String,
pub parent: Option<Parent>,
pub version: Option<String>,
pub name: Option<String>,
pub description: Option<String>,
pub url: Option<String>,
pub scm: Option<Scm>,
}
Expand description
Represents a pom file.
This structure is used with Serde to deserialize a pom file.
§Example
use maven_rs::pom::Pom;
const EXAMPLE_POM: &str = r#"
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0</version>
<name>Apache Maven Artifact</name>
</project>
"#;
let x: Pom = maven_rs::quick_xml::de::from_str(EXAMPLE_POM).unwrap();
println!("{:#?}", x);
assert_eq!(x.group_id, Some("org.apache.maven".to_string()));
assert_eq!(x.artifact_id, "maven-artifact".to_string());
assert_eq!(x.version, Some("3.0".to_string()));
Fields§
§group_id: Option<String>
§artifact_id: String
§parent: Option<Parent>
§version: Option<String>
§name: Option<String>
§description: Option<String>
§url: Option<String>
§scm: Option<Scm>
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pom
impl<'de> Deserialize<'de> for Pom
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
Auto Trait Implementations§
impl Freeze for Pom
impl RefUnwindSafe for Pom
impl Send for Pom
impl Sync for Pom
impl Unpin for Pom
impl UnwindSafe for Pom
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