#[non_exhaustive]pub enum StateConflict {
PreviousSessionOpen,
IncompleteFileTracking,
EarlierSessionEvents,
StopNotRequested,
Stopping,
NotRecording,
ExactFileName,
WaiterPending,
Closed,
OwnerFailed,
}Expand description
Why an operation is not permitted in the current state, carried by
Error::InvalidState.
Its Display text describes the state for diagnostics; match on the
variant rather than the text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PreviousSessionOpen
A session is recording or stopping, or a known file awaits closure under complete tracking. Finish or poll it before starting another.
IncompleteFileTracking
The session ended with incomplete file tracking after native event
loss, unreadable lifecycle evidence or a tracking limit. Even after
every known file closes, unknown files may still be open and cleanup
uses the remaining FileRecorderOptions::drop_wait budget. Later
events do not change the indeterminate report. Start another session
only after a successful FileRecorder::reset
replaces the recorder. A failed reset preserves the recorder and its
cleanup obligation. Eviction from the async application event queue
does not affect native file tracking.
EarlierSessionEvents
Events from an earlier session kept arriving, so a new session was not started.
StopNotRequested
Waiting for a session to end needs a session that has been asked to stop, or that the SDK is ending.
Stopping
The session is stopping.
NotRecording
The operation needs a session that is recording.
ExactFileName
The recorder names its files exactly, so it cannot switch to a new file
during a session: the next file would have the same name. Use a
filename pattern with {index}.
WaiterPending
Another event future is already waiting on the async handle, which delivers each event to one waiter. A close never reports this: closes made while one is awaited complete with it.
Closed
The async handle’s object has been closed, or its thread stopped
normally before it carried out the operation. A thread that failed
reports OwnerFailed instead.
Also returned by an in-flight async finish or wait when a concurrent
close’s remaining finalization budget ends without a settled outcome.
OwnerFailed
The async handle’s thread failed, for example by panicking. The
operation it was running, every command queued behind it, every later
command, every event wait and the close report this, not
Closed.
Implementations§
Source§impl StateConflict
impl StateConflict
Sourcepub fn is_retryable(self) -> bool
pub fn is_retryable(self) -> bool
Whether the same call can succeed later without anything else changing
on this handle: true only for WaiterPending,
once the other waiter has finished. A full command queue, which can
also succeed later, is Error::QueueFull.
The other states change only through another call, such as finishing a session, or never, for a handle that is closed.
Trait Implementations§
Source§impl Clone for StateConflict
impl Clone for StateConflict
impl Copy for StateConflict
Source§impl Debug for StateConflict
impl Debug for StateConflict
Source§impl Display for StateConflict
impl Display for StateConflict
impl Eq for StateConflict
Source§impl Error for StateConflict
impl Error for StateConflict
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()