pub struct HandleStore { /* private fields */ }Expand description
Session-scoped store of content handles.
Implementations§
Source§impl HandleStore
impl HandleStore
pub fn new() -> Self
Sourcepub fn create_handle(
&mut self,
path: &str,
content: &str,
line_count: usize,
token_count: usize,
) -> String
pub fn create_handle( &mut self, path: &str, content: &str, line_count: usize, token_count: usize, ) -> String
Create and store a handle for delivered content.
Sourcepub fn get(&self, handle_id: &str) -> Option<&ContentHandle>
pub fn get(&self, handle_id: &str) -> Option<&ContentHandle>
Look up a handle.
Sourcepub fn invalidate(&mut self, path: &str)
pub fn invalidate(&mut self, path: &str)
Invalidate handles for a modified file.
pub fn handle_count(&self) -> usize
pub fn reset(&mut self)
Trait Implementations§
Source§impl Clone for HandleStore
impl Clone for HandleStore
Source§fn clone(&self) -> HandleStore
fn clone(&self) -> HandleStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandleStore
impl Debug for HandleStore
Source§impl Default for HandleStore
impl Default for HandleStore
Source§fn default() -> HandleStore
fn default() -> HandleStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HandleStore
impl RefUnwindSafe for HandleStore
impl Send for HandleStore
impl Sync for HandleStore
impl Unpin for HandleStore
impl UnsafeUnpin for HandleStore
impl UnwindSafe for HandleStore
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more