pub struct ElementBuffer { /* private fields */ }
Implementations§
Source§impl ElementBuffer
impl ElementBuffer
pub fn new(max_retries: usize) -> Self
Sourcepub async fn add_element(
&self,
element_id: LocalElementId,
element_registration: ElementRegistration,
)
pub async fn add_element( &self, element_id: LocalElementId, element_registration: ElementRegistration, )
Adds an element to the pending queue.
Sourcepub async fn get_pending_elements(&self) -> Vec<BufferEntry>
pub async fn get_pending_elements(&self) -> Vec<BufferEntry>
Retrieves and removes all pending elements.
Sourcepub async fn mark_failed(&self, element: BufferEntry)
pub async fn mark_failed(&self, element: BufferEntry)
Marks an element as failed and handles retries.
Returns true
if the element will be retried, false
otherwise.
Sourcepub async fn mark_succeeded(&self, element_id: &LocalElementId)
pub async fn mark_succeeded(&self, element_id: &LocalElementId)
Marks an element as successfully registered.
Auto Trait Implementations§
impl !Freeze for ElementBuffer
impl !RefUnwindSafe for ElementBuffer
impl Send for ElementBuffer
impl Sync for ElementBuffer
impl Unpin for ElementBuffer
impl !UnwindSafe for ElementBuffer
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