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
|
Overwrite
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ElementUpdateStrategy {
|
||||||
|
pub fn default_by_content(&self, content: &ElementContent) -> Self {
|
||||||
|
match content {
|
||||||
|
_ => Self::Overwrite,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Default for ElementUpdateStrategy {
|
impl Default for ElementUpdateStrategy {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::Overwrite
|
Self::Overwrite
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue