pub enum Property {
Variable(String),
UnclosedVariable(String),
Literal(String),
Expression(Vec<Property>),
}
Variants§
Variable(String)
A variable
<version>${project.version}</version>
UnclosedVariable(String)
An unclosed variable
<version>${project.version</version>
Literal(String)
A literal string
<version>1.0.0</version>
Expression(Vec<Property>)
An expression
<version>${project.version}-${maven.buildNumber}</version>
This would be parsed as
let expression = vec![
Property::Variable("project.version".to_string()),
Property::Literal("-".to_string()),
Property::Variable("maven.buildNumber".to_string())
];
Implementations§
Source§impl Property
impl Property
pub fn is_variable(&self) -> bool
pub fn is_maven_variable(&self) -> bool
pub fn is_project_variable(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Property
impl<'de> Deserialize<'de> for Property
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 PomValue for Property
impl PomValue for Property
fn from_str_for_editor(value: &str) -> Result<Self, InvalidValueError>
fn to_string_for_editor(&self) -> String
fn from_string_for_editor(value: String) -> Result<Self, InvalidValueError>
fn from_element(
element: Element,
document: &Document,
) -> Result<Self, XMLEditorError>where
Self: Sized,
Source§impl Serialize for Property
impl Serialize for Property
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Property
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnwindSafe for Property
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