Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
Show 14 variants DriveOpened { device: String, }, DriveReady, InitComplete { success: bool, }, ProbeComplete { success: bool, }, ScanComplete { titles: usize, }, BytesRead { bytes: u64, total: u64, }, ReadError { sector: u64, error: Error, }, Retry { attempt: u32, }, SpeedChange { speed_kbs: u16, }, ExtentStart { index: usize, start_sector: u64, sector_count: u64, }, SectorRecovered { sector: u64, }, SectorSkipped { sector: u64, }, BatchSizeChanged { new_size: u16, reason: BatchSizeReason, }, Complete { bytes: u64, errors: u32, },
}
Expand description

Types of events the lib can fire.

Variants§

§

DriveOpened

Drive opened successfully.

Fields

§device: String
§

DriveReady

Drive is ready (disc spun up).

§

InitComplete

Firmware init completed.

Fields

§success: bool
§

ProbeComplete

Disc probe completed.

Fields

§success: bool
§

ScanComplete

Disc scan completed.

Fields

§titles: usize
§

BytesRead

Bytes successfully read and written to output.

Fields

§bytes: u64

Bytes written so far.

§total: u64

Total bytes expected (0 if unknown).

§

ReadError

A read error occurred. The lib will retry automatically.

Fields

§sector: u64

Sector that failed.

§error: Error

Error code.

§

Retry

Retrying a failed read.

Fields

§attempt: u32

Current attempt number (1-based).

§

SpeedChange

Drive speed changed (error recovery or restoration).

Fields

§speed_kbs: u16

New speed in KB/s (0xFFFF = max).

§

ExtentStart

Starting a new disc extent.

Fields

§index: usize

Extent index (0-based).

§start_sector: u64

First sector of extent.

§sector_count: u64

Number of sectors in extent.

§

SectorRecovered

Sector recovered after a retry (Drive::read multi-phase recovery).

Fields

§sector: u64
§

SectorSkipped

Sector unreadable, zero-filled (skip mode).

Fields

§sector: u64
§

BatchSizeChanged

Adaptive batch sizer changed the read size.

Fires on shrink (read failed at larger size) and on probe-up (enough clean reads to try larger again). Consumers use this to display a “recovering” state distinct from “ripping normally”.

Fields

§new_size: u16
§

Complete

Operation complete.

Fields

§bytes: u64

Total bytes written.

§errors: u32

Total read errors encountered.

Trait Implementations§

Source§

impl Debug for EventKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,