pub struct SharedBytes { /* private fields */ }Expand description
The bytes of a shared buffer, which other agents may hold too.
Implementations§
pub fn new(len: usize, capacity: usize) -> Arc<SharedBytes> ⓘ
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
Sourcepub fn grow(&self, len: usize) -> bool
pub fn grow(&self, len: usize) -> bool
Grows to len (at most the capacity); false if another agent made
it longer meanwhile or len is shorter.
pub fn byte(&self, index: usize) -> &AtomicU8
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more