renew_traits/
traits.rs

1crate::ix!();
2
3pub trait ExtendWith<Item> {
4
5    type Error;
6
7    fn extend_with(&mut self, item: &Item) 
8        -> Result<(),Self::Error>;
9}
10
11pub trait FillToLenWithItems {
12
13    type Item;
14
15    fn fill_to_len(&mut self, len: usize, items: Vec<Self::Item>);
16}
17
18pub trait ReinitWithLen {
19
20    fn reinit(&mut self, len: usize);
21}
22
23pub trait FillWith {
24
25    type Item;
26
27    fn fill(&mut self, val: Self::Item);
28}
29
30pub trait InitInternals {
31
32    type Error;
33
34    fn init_internals(&mut self) 
35    -> Result<(),Self::Error>;
36}
37
38pub trait InitWithSize {
39
40    fn init_size(&mut self, size: usize);
41}
42
43pub trait Clear {
44
45    fn clear(&mut self);
46}
47
48pub trait CreateNamedEmpty {
49
50    fn empty(name: &str) -> Self;
51}
52
53pub trait CreateEmpty {
54
55    fn empty() -> Self;
56}
57
58pub trait ResetWith<Input> {
59
60    fn reset_with(&mut self, g: &Input);
61}