pub struct PersistenceService {
pub cache: Arc<Mutex<HashMap<String, Value>>>,
pub file_handle: Arc<Mutex<Option<SafeHandle>>>,
pub file_path: String,
pub using_service_protection: bool,
}Expand description
Persistence service implementation for handling key-value storage operations.
Fields§
§cache: Arc<Mutex<HashMap<String, Value>>>In-memory cache of the key-value store
file_handle: Arc<Mutex<Option<SafeHandle>>>Handle from service.exe OR direct file handle
file_path: StringPath to the persistence file
using_service_protection: boolWhether we’re using service.exe protection
Implementations§
Trait Implementations§
Source§impl Service for PersistenceService
impl Service for PersistenceService
Source§fn run<'life0, 'async_trait>(
&'life0 self,
action: Value,
write: WebSocketWrite,
) -> Pin<Box<dyn Future<Output = (i32, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
action: Value,
write: WebSocketWrite,
) -> Pin<Box<dyn Future<Output = (i32, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes a persistence service action based on the provided JSON input.
Source§fn stop_service(&self)
fn stop_service(&self)
Stops the persistence service and performs cleanup.
Source§fn get_version(&self) -> String
fn get_version(&self) -> String
Returns the version of the PersistenceService module.
Auto Trait Implementations§
impl Freeze for PersistenceService
impl !RefUnwindSafe for PersistenceService
impl Send for PersistenceService
impl Sync for PersistenceService
impl Unpin for PersistenceService
impl !UnwindSafe for PersistenceService
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> 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> 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