struct CirBuffer {
buf: [u8; 256],
lowest_mem_addr: *const u8,
highest_mem_addr: *const u8,
is_empty: bool,
is_full: bool,
}
构造项目lowest_mem_addr 是佩戴面罩。
impl CirBuffer 页: 1
fn create () -> Self{
CirBuffer {
buf: [0;256],
lowest_mem_addr: &(*self).buf[0],=> How to get the address of buf[0] here ?
highest_mem_addr: &self.buf[255],