pub fn new(value: T, len:usize) -> Self
    where T: Copy + Clone
    {
        let mut buf = Self{
            s_buf: [value; N],
            d_buf: None,
            layout: None,
            size: 0,
            capacity: N,
            default: value,
            cursor: 0,
        };

        if N < len{
            buf.allocate(len - N);
        }
        buf
    }
// creates a SmartBuffer where the default value is set to the value entered
creates a SmartBuffer where the default value is set to the value entered
creates a SmartBuffer where the default value is set to the value entered
pub fn new(value: T, len:usize) -> Self
    where T: Copy + Clone
    {
        let mut buf = Self{
            s_buf: [value; N],
            d_buf: None,
            layout: None,
            size: 0,
            capacity: N,
            default: value,
            cursor: 0,
        };
        if N < len{
            buf.allocate(len - N);
        }
        buf
    }
pub fn new ( value : T , len : usize ) -> Self where T : Copy + Clone { let mut buf = Self { s_buf : [ value ; N ] , d_buf : None , layout : None , size : 0 , capacity : N , default : value , cursor : 0 , } ; if N < len { buf . allocate ( len - N ) ; } buf }
creates a SmartBuffer where the default value is set to the value entered
creates a SmartBuffer where the default value is set to the value entered
value
T
len
usize
value
T
len
usize