pub struct WriterActor { /* private fields */ }Expand description
Single-threaded writer that serializes all mutations through one SQLite connection.
On drop, the channel is closed and the writer thread is joined, ensuring all
in-flight writes complete and the SQLite connection closes cleanly.
Implementations§
Source§impl WriterActor
impl WriterActor
Sourcepub fn start(
path: impl AsRef<Path>,
schema_manager: Arc<SchemaManager>,
provenance_mode: ProvenanceMode,
telemetry: Arc<TelemetryCounters>,
) -> Result<Self, EngineError>
pub fn start( path: impl AsRef<Path>, schema_manager: Arc<SchemaManager>, provenance_mode: ProvenanceMode, telemetry: Arc<TelemetryCounters>, ) -> Result<Self, EngineError>
§Errors
Returns EngineError if the writer thread cannot be spawned.
Sourcepub fn submit(&self, request: WriteRequest) -> Result<WriteReceipt, EngineError>
pub fn submit(&self, request: WriteRequest) -> Result<WriteReceipt, EngineError>
§Errors
Returns EngineError if the write request validation fails, the writer actor has shut
down, or the underlying SQLite transaction fails.
Sourcepub fn touch_last_accessed(
&self,
request: LastAccessTouchRequest,
) -> Result<LastAccessTouchReport, EngineError>
pub fn touch_last_accessed( &self, request: LastAccessTouchRequest, ) -> Result<LastAccessTouchReport, EngineError>
§Errors
Returns EngineError if validation fails, the writer actor has shut down,
or the underlying SQLite transaction fails.
Trait Implementations§
Source§impl Debug for WriterActor
impl Debug for WriterActor
Auto Trait Implementations§
impl Freeze for WriterActor
impl !RefUnwindSafe for WriterActor
impl Send for WriterActor
impl Sync for WriterActor
impl Unpin for WriterActor
impl UnsafeUnpin for WriterActor
impl !UnwindSafe for WriterActor
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