pub struct ContainerBuffer { /* private fields */ }
Implementations§
Source§impl ContainerBuffer
impl ContainerBuffer
Sourcepub fn push_back(&self, msg: &[u8])
pub fn push_back(&self, msg: &[u8])
Ingests a new message.
If the message is invalid, it is dropped.
Sourcepub fn cursor(&self, mode: StreamMode) -> Option<Cursor>
pub fn cursor(&self, mode: StreamMode) -> Option<Cursor>
Returns a cursor.
Sourcepub fn terminate(&self)
pub fn terminate(&self)
Marks the buffer as terminated which will force all cursors to end and close all sockets. The component’s data will remain in the buffer until the messages are rolled out. This will not drain sockets.
Sourcepub fn add_socket(&self, socket: Socket)
pub fn add_socket(&self, socket: Socket)
Adds a socket for this container.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContainerBuffer
impl !RefUnwindSafe for ContainerBuffer
impl Send for ContainerBuffer
impl Sync for ContainerBuffer
impl Unpin for ContainerBuffer
impl !UnwindSafe for ContainerBuffer
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