implemented function mapping ElementContent
s to their default ElementUpdateStrategy
. Closes #15
This commit is contained in:
parent
1b1f1dfffa
commit
25570765d7
1 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,14 @@ pub enum ElementUpdateStrategy {
|
|||
Overwrite
|
||||
}
|
||||
|
||||
impl ElementUpdateStrategy {
|
||||
pub fn default_by_content(&self, content: &ElementContent) -> Self {
|
||||
match content {
|
||||
_ => Self::Overwrite,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for ElementUpdateStrategy {
|
||||
fn default() -> Self {
|
||||
Self::Overwrite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue