Skip to content

Commit

Permalink
feat: Add getter for property parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Apr 10, 2022
1 parent dad79f4 commit 3702a20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,21 @@ impl Property {
}
}

/// Clones the key field.
/// Returns a reference to the key field.
pub fn key(&self) -> &str {
&self.key
}

/// Clones the key field.
/// Returns a reference to the key field.
pub fn value(&self) -> &str {
&self.val
}

/// Returns a reference to the parameters.
pub fn params(&self) -> &EntryParameters {
&self.params
}

/// Appends a new parameter.
pub fn append_parameter<I: Into<Parameter>>(&mut self, into_parameter: I) -> &mut Self {
let parameter = into_parameter.into();
Expand Down

0 comments on commit 3702a20

Please sign in to comment.