[−][src]Trait df_st_core::fillable::Filler
Trait for object that are used for filling Fillable
structs
Required methods
fn add_missing_data(&mut self, source: &S)
Add data to self that is set as None
or appends list items.
Use source object to get values from.
Provided methods
fn add_missing_data_indexed(&mut self, source: &S, _index: u64)
Add data to self from source. Same ways as add_missing_data
.
This function is used when adding data when looping over lists.
This allows the index
to be used. For example as an incremental ID.
This function can be overwritten if this ID is wanted.
fn never_replace_data(&mut self, source: &S) where
Self: Debug,
Self: Debug,
Add data to self that is set as None
or appends list items.
If a value is Some
it will leave the value as is.
fn replace_data(&mut self, source: &S) where
Self: Debug,
Self: Debug,
Add data to self. If already some value present, replace it.
Appends list items.
This is used when there is data that is richer then previous data.
It does not trow the not_same_data
warning.
add_missing_data
should be used in most cases instead.
fn check_mergeable(&self, source: &S) -> bool where
Self: Debug + Default + PartialEq<Self>,
S: PartialEq<Self> + Debug,
Self: Debug + Default + PartialEq<Self>,
S: PartialEq<Self> + Debug,
Implementations on Foreign Types
impl Filler<i32, i32> for i32
[src]
fn add_missing_data(&mut self, source: &i32)
[src]
fn never_replace_data(&mut self, source: &i32)
[src]
fn replace_data(&mut self, source: &i32)
[src]
impl Filler<i32, Option<i32>> for i32
[src]
fn add_missing_data(&mut self, source: &Option<i32>)
[src]
fn never_replace_data(&mut self, source: &Option<i32>)
[src]
fn replace_data(&mut self, source: &Option<i32>)
[src]
impl Filler<u32, u32> for u32
[src]
fn add_missing_data(&mut self, source: &u32)
[src]
fn never_replace_data(&mut self, source: &u32)
[src]
fn replace_data(&mut self, source: &u32)
[src]
impl Filler<u8, u8> for u8
[src]
fn add_missing_data(&mut self, source: &u8)
[src]
fn never_replace_data(&mut self, source: &u8)
[src]
fn replace_data(&mut self, source: &u8)
[src]
impl Filler<bool, bool> for bool
[src]
fn add_missing_data(&mut self, source: &bool)
[src]
fn never_replace_data(&mut self, source: &bool)
[src]
fn replace_data(&mut self, source: &bool)
[src]
impl Filler<Option<bool>, Option<()>> for Option<bool>
[src]
If a value is added the option is always Some
.
The absence of the add_missing_data defines None
.
fn add_missing_data(&mut self, source: &Option<()>)
[src]
fn never_replace_data(&mut self, source: &Option<()>)
[src]
fn replace_data(&mut self, source: &Option<()>)
[src]
impl Filler<Option<bool>, Option<String>> for Option<bool>
[src]
If a value is "true" or "false" use there respective boolean value.
It the tag was a self closing tag <example/>
then it will still be correct.
This is so both (self closing and non-self closing) ways will work.
So it works if the type was Option<bool>
or Option<()>
but both have to work.
fn add_missing_data(&mut self, source: &Option<String>)
[src]
fn never_replace_data(&mut self, source: &Option<String>)
[src]
fn replace_data(&mut self, source: &Option<String>)
[src]
impl Filler<String, String> for String
[src]
fn add_missing_data(&mut self, source: &String)
[src]
fn never_replace_data(&mut self, source: &String)
[src]
fn replace_data(&mut self, source: &String)
[src]
impl<T, R> Filler<Vec<T>, Vec<R>> for Vec<T> where
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug,
[src]
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug,
fn add_missing_data(&mut self, source: &Vec<R>)
[src]
For each item in source
list
- If already in list,
add_missing_data
on both elements - Else push item to
self
list
fn never_replace_data(&mut self, source: &Vec<R>)
[src]
fn replace_data(&mut self, source: &Vec<R>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, IndexMap<u64, R, RandomState>> for IndexMap<u64, T> where
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
[src]
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
fn add_missing_data(&mut self, source: &IndexMap<u64, R>)
[src]
For each item in source
list
- If already in list,
add_missing_data
on both elements - Else push item to
self
list
fn never_replace_data(&mut self, source: &IndexMap<u64, R>)
[src]
fn replace_data(&mut self, source: &IndexMap<u64, R>)
[src]
impl<T, R> Filler<HashSet<T, RandomState>, HashSet<R, RandomState>> for HashSet<T> where
T: Fillable + Filler<T, R> + Default + Debug + Eq + Hash,
R: PartialEq<T> + Debug,
[src]
T: Fillable + Filler<T, R> + Default + Debug + Eq + Hash,
R: PartialEq<T> + Debug,
fn add_missing_data(&mut self, source: &HashSet<R>)
[src]
For each item in source
list
- If already in list,
add_missing_data
on both elements - Else push item to
self
list
fn never_replace_data(&mut self, source: &HashSet<R>)
[src]
fn replace_data(&mut self, source: &HashSet<R>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, Vec<R>> for IndexMap<u64, T> where
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
[src]
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
fn add_missing_data(&mut self, source: &Vec<R>)
[src]
For each item in source
list
- If already in list,
add_missing_data
on both elements - Else push item to
self
list
fn never_replace_data(&mut self, source: &Vec<R>)
[src]
fn replace_data(&mut self, source: &Vec<R>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, HashSet<R, RandomState>> for IndexMap<u64, T> where
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
[src]
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
fn add_missing_data(&mut self, source: &HashSet<R>)
[src]
For each item in source
list
- If already in list,
add_missing_data
on both elements - Else push item to
self
list
fn never_replace_data(&mut self, source: &HashSet<R>)
[src]
fn replace_data(&mut self, source: &HashSet<R>)
[src]
impl<T, R> Filler<Option<T>, Option<R>> for Option<T> where
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug + Clone,
[src]
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug + Clone,
fn add_missing_data(&mut self, source: &Option<R>)
[src]
fn never_replace_data(&mut self, source: &Option<R>)
[src]
fn replace_data(&mut self, source: &Option<R>)
[src]
impl<T, R> Filler<Vec<T>, Option<Vec<R>>> for Vec<T> where
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug,
[src]
T: Fillable + Filler<T, R> + Default + Debug,
R: PartialEq<T> + Debug,
fn add_missing_data(&mut self, source: &Option<Vec<R>>)
[src]
fn never_replace_data(&mut self, source: &Option<Vec<R>>)
[src]
fn replace_data(&mut self, source: &Option<Vec<R>>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, Option<Vec<R>>> for IndexMap<u64, T> where
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,
[src]
T: Fillable + Filler<T, R> + Default + Debug + Hash,
R: PartialEq<T> + Debug + Hash,