pub fn new(
        size: usize,
        name: &'static str,
        args: Vec<(usize, Box<dyn IArgLeaf>)>
        ) -> ArgComposite
    {
        if sanitize_overlaping(&args, size) {
            panic!("overlap in {}", name)
        }

        ArgComposite {
            size : size,
            name : name,
            args : args,
            logicer : None,
        }
    }
/// - elegant feature, is that arguments can be in arbitrary order ( therefore offset needed )
/// - they will be built in order you specify
///     - can be nice, once you have corelation between two sub-args, and once is dependable on another but in struct those are in reversed order ...
///
/// # Panic
/// - overlaping is forbiden (paniced)!
///
/// # Example :
/// ```
/// impl ArgComposite {
/// pub fn test_arg(size: usize) -> ArgComposite {
///     ArgComposite::new(
///         size,
///         "TestArg-composite",
///         vec![
///             (0, Box::new(TestArg::new(1))),
///             (1, Box::new(TestArg::new(size - 1))),
///         ])
///     }
/// }
/// ```
elegant feature, is that arguments can be in arbitrary order ( therefore offset needed )
they will be built in order you specify
can be nice, once you have corelation between two sub-args, and once is dependable on another but in struct those are in reversed order
elegant feature is that arguments can be in arbitrary order ( therefore offset needed ) they will be built in order you specify can be nice once you have corelation between two sub - args and once is dependable on another but in struct those are in reversed order
pub fn new(
        size: usize,
        name: &'static str,
        args: Vec<(usize, Box<dyn IArgLeaf>)>
        ) -> ArgComposite
    {
        if sanitize_overlaping(&args, size) {
            panic!("overlap in {}", name)
        }
        ArgComposite {
            size : size,
            name : name,
            args : args,
            logicer : None,
        }
    }
pub fn new ( size : usize , name : & ' static str , args : Vec < ( usize , Box < dyn IArgLeaf > ) > ) -> ArgComposite { if sanitize_overlaping ( & args , size ) { panic ! ( " " name ) } ArgComposite { size : size , name : name , args : args , logicer : None , } }
elegant feature, is that arguments can be in arbitrary order ( therefore offset needed )
 they will be built in order you specify
 can be nice, once you have corelation between two sub-args, and once is dependable on another but in struct those are in reversed order ...
elegant feature is that arguments can be in arbitrary order ( therefore offset needed ) they will be built in order you specify can be nice once you have corelation between two sub - args and once is dependable on another but in struct those are in reversed order ...
size
usize
name
&'static str
args
Vec<(usize, Box<dyn IArgLeaf>)>
size
usize
name
&'static str
args
Vec<(usize, Box<dyn IArgLeaf>)>
panic
overlaping is forbiden (paniced)!
overlaping is forbiden ( paniced ) !
example :
```
impl ArgComposite {
pub fn test_arg(size: usize) -> ArgComposite {
ArgComposite::new(
size,
"TestArg-composite",
vec![
(0, Box::new(TestArg::new(1))),
(1, Box::new(TestArg::new(size - 1))),
])
}
}
```
` ` ` impl ArgComposite { pub fn test_arg ( size : usize ) - > ArgComposite { ArgComposite :: new ( size " TestArg - composite " vec! [ ( 0 Box :: new ( TestArg :: new ( 1 ))) ( 1 Box :: new ( TestArg :: new ( size - 1 ))) ] ) } } ` ` `