[][src]Macro smart_buffer::buf

macro_rules! buf {
    ($data:expr, $s_len:expr, $t_len:expr) => { ... };
}

Macro that easily creates a new SmartBuffer!

Requires data, s_len, t_len

  • The first element in the macro requires the data that will be used in the SmartBuffer
  • The second element is the size of the stack portion of the SmartBuffer, whose size must be known on compile time. (CONSTANT)
  • The third element is the total required size of the SmartBuffer, which allocates memory if necessary on the heap at runtime!