[−][src]Trait df_st_core::fillable::Filler
Trait for object that are used for filling Fillable
structs
Required methods
pub fn add_missing_data(&mut self, source: &S)
[src]
Add data to self that is set as None
or appends list items.
Use source object to get values from.
Provided methods
pub fn add_missing_data_indexed(&mut self, source: &S, _index: u64)
[src]
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.
pub fn never_replace_data(&mut self, source: &S) where
Self: Debug,
[src]
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.
pub fn replace_data(&mut self, source: &S) where
Self: Debug,
[src]
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.
pub fn check_mergeable(&self, source: &S) -> bool where
Self: Debug + Default + PartialEq<Self>,
S: PartialEq<Self> + Debug,
[src]
Self: Debug + Default + PartialEq<Self>,
S: PartialEq<Self> + Debug,
Implementations on Foreign Types
impl Filler<i32, i32> for i32
[src]
pub fn add_missing_data(&mut self, source: &i32)
[src]
pub fn never_replace_data(&mut self, source: &i32)
[src]
pub fn replace_data(&mut self, source: &i32)
[src]
impl Filler<i32, Option<i32>> for i32
[src]
pub fn add_missing_data(&mut self, source: &Option<i32>)
[src]
pub fn never_replace_data(&mut self, source: &Option<i32>)
[src]
pub fn replace_data(&mut self, source: &Option<i32>)
[src]
impl Filler<u32, u32> for u32
[src]
pub fn add_missing_data(&mut self, source: &u32)
[src]
pub fn never_replace_data(&mut self, source: &u32)
[src]
pub fn replace_data(&mut self, source: &u32)
[src]
impl Filler<u8, u8> for u8
[src]
pub fn add_missing_data(&mut self, source: &u8)
[src]
pub fn never_replace_data(&mut self, source: &u8)
[src]
pub fn replace_data(&mut self, source: &u8)
[src]
impl Filler<bool, bool> for bool
[src]
pub fn add_missing_data(&mut self, source: &bool)
[src]
pub fn never_replace_data(&mut self, source: &bool)
[src]
pub 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
.
pub fn add_missing_data(&mut self, source: &Option<()>)
[src]
pub fn never_replace_data(&mut self, source: &Option<()>)
[src]
pub 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.
pub fn add_missing_data(&mut self, source: &Option<String>)
[src]
pub fn never_replace_data(&mut self, source: &Option<String>)
[src]
pub fn replace_data(&mut self, source: &Option<String>)
[src]
impl Filler<String, String> for String
[src]
pub fn add_missing_data(&mut self, source: &String)
[src]
pub fn never_replace_data(&mut self, source: &String)
[src]
pub fn replace_data(&mut self, source: &String)
[src]
impl<T, R> Filler<Vec<T, Global>, Vec<R, Global>> 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,
pub 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
pub fn never_replace_data(&mut self, source: &Vec<R>)
[src]
pub 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,
pub 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
pub fn never_replace_data(&mut self, source: &IndexMap<u64, R>)
[src]
pub 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,
pub 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
pub fn never_replace_data(&mut self, source: &HashSet<R>)
[src]
pub fn replace_data(&mut self, source: &HashSet<R>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, Vec<R, Global>> 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,
pub 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
pub fn never_replace_data(&mut self, source: &Vec<R>)
[src]
pub 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,
pub 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
pub fn never_replace_data(&mut self, source: &HashSet<R>)
[src]
pub 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,
pub fn add_missing_data(&mut self, source: &Option<R>)
[src]
pub fn never_replace_data(&mut self, source: &Option<R>)
[src]
pub fn replace_data(&mut self, source: &Option<R>)
[src]
impl<T, R> Filler<Vec<T, Global>, Option<Vec<R, Global>>> 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,
pub fn add_missing_data(&mut self, source: &Option<Vec<R>>)
[src]
pub fn never_replace_data(&mut self, source: &Option<Vec<R>>)
[src]
pub fn replace_data(&mut self, source: &Option<Vec<R>>)
[src]
impl<T, R> Filler<IndexMap<u64, T, RandomState>, Option<Vec<R, Global>>> 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,