pub struct SpillableGraph<G> {
pub graph: G,
pub spill_manager: SpillManager,
/* private fields */
}Expand description
A graph wrapper that automatically spills to disk when memory limit is reached
Fields§
§graph: GThe underlying graph
spill_manager: SpillManagerSpill manager
Implementations§
Source§impl<G> SpillableGraph<G>
impl<G> SpillableGraph<G>
Sourcepub fn new(graph: G, segment_name: &str, config: SpillConfig) -> Self
pub fn new(graph: G, segment_name: &str, config: SpillConfig) -> Self
Create a new spillable graph wrapper
Sourcepub fn segment_name(&self) -> &str
pub fn segment_name(&self) -> &str
Get the segment name
Sourcepub fn check_memory(&mut self, current_size: usize) -> bool
pub fn check_memory(&mut self, current_size: usize) -> bool
Check memory and spill if needed
Sourcepub fn stats(&self) -> SpillStats
pub fn stats(&self) -> SpillStats
Get spill manager stats
Auto Trait Implementations§
impl<G> !Freeze for SpillableGraph<G>
impl<G> RefUnwindSafe for SpillableGraph<G>where
G: RefUnwindSafe,
impl<G> Send for SpillableGraph<G>where
G: Send,
impl<G> Sync for SpillableGraph<G>where
G: Sync,
impl<G> Unpin for SpillableGraph<G>where
G: Unpin,
impl<G> UnsafeUnpin for SpillableGraph<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for SpillableGraph<G>where
G: UnwindSafe,
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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