Indeed:
lazy_static! { static ref BUF: [[u8;1024]; 16] = [ [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024], [0;1024]]; static ref BUF_INDEX: usize = 0; }
> BUF is also visible to other parts of the program, correct? If so, it's not quite similar to the C example.
No, because it's not marked as `pub`, nobody outside the current module can access it.
Indeed:
(You'll need to re-implement a `push_str` method on arrays yourself though)> BUF is also visible to other parts of the program, correct? If so, it's not quite similar to the C example.
No, because it's not marked as `pub`, nobody outside the current module can access it.