I'm not entirely familiar with embedded programming, but I don't think I understand your buffer example. A serial line adds to the buffer, incrementing an internal "current end position". You grab a drain iterator or a slice, incrementing the internal "current start position". At no point is there any manual arithmetic for any off by 1 errors.