pub struct Scm {
pub url: Option<String>,
pub connection: Option<String>,
pub tag: Option<String>,
pub developer_connection: Option<String>,
}
Fields§
§url: Option<String>
URL should be formatted as scm:{provider}:{provider_specific}
connection: Option<String>
§tag: Option<String>
§developer_connection: Option<String>
Implementations§
Source§impl Scm
impl Scm
Sourcepub fn get_provider_for_connection(&self) -> Result<Option<String>, SCMError>
pub fn get_provider_for_connection(&self) -> Result<Option<String>, SCMError>
Gets the provider of the scm
use maven_rs::pom::ScmBuilder;
let scm = ScmBuilder::default().connection("scm:git:https://github.com/wyatt-herkamp/maven-rs").build().unwrap();
assert_eq!(scm.get_provider_for_connection().unwrap(), Some("git".to_owned()));
Sourcepub fn get_provider_specific_for_connection(
&self,
) -> Result<Option<String>, SCMError>
pub fn get_provider_specific_for_connection( &self, ) -> Result<Option<String>, SCMError>
Gets the provider specific part of the scm
use maven_rs::pom::ScmBuilder;
let scm = ScmBuilder::default().connection("scm:git:https://github.com/wyatt-herkamp/maven-rs").build().unwrap();
assert_eq!(scm.get_provider_specific_for_connection().unwrap(), Some("https://github.com/wyatt-herkamp/maven-rs".to_owned()));
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scm
impl<'de> Deserialize<'de> for Scm
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 ElementConverter for Scm
impl ElementConverter for Scm
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 HasElementName for Scm
impl HasElementName for Scm
Source§fn element_name() -> &'static str
fn element_name() -> &'static str
The name of the element.
Source§impl UpdatableElement for Scm
impl UpdatableElement for Scm
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 Scm
impl StructuralPartialEq for Scm
Auto Trait Implementations§
impl Freeze for Scm
impl RefUnwindSafe for Scm
impl Send for Scm
impl Sync for Scm
impl Unpin for Scm
impl UnwindSafe for Scm
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