pub struct Pool {
entries: IndexedQueue<FragmentId, Fragment>,
max_entries: usize,
}
Fields§
§entries: IndexedQueue<FragmentId, Fragment>
§max_entries: usize
Implementations§
source§impl Pool
impl Pool
pub fn new(max_entries: usize) -> Self
sourcepub fn insert_all(
&mut self,
fragments: impl IntoIterator<Item = (Fragment, FragmentId)>
) -> Vec<(Fragment, FragmentId)>
pub fn insert_all( &mut self, fragments: impl IntoIterator<Item = (Fragment, FragmentId)> ) -> Vec<(Fragment, FragmentId)>
Returns clones of registered fragments
pub fn remove_all<'a>( &mut self, fragment_ids: impl IntoIterator<Item = &'a FragmentId> )
pub fn remove_oldest(&mut self) -> Option<(Fragment, FragmentId)>
pub fn len(&self) -> usize
pub fn max_entries(&self) -> usize
Auto Trait Implementations§
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnwindSafe for Pool
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request