#![deny(unsafe_code)]
#![warn(missing_docs)]
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used, clippy::panic))]
#[cfg(test)]
extern crate self as scarletbook;
pub mod audio;
mod control;
mod disc;
mod dispatch;
pub mod dst;
mod error;
mod image;
pub mod log;
#[cfg(feature = "output")]
pub mod output;
pub mod read_at;
pub mod seek;
pub mod text;
pub mod toc;
#[cfg(feature = "parallel")]
pub use audio::DecodeOn;
pub use audio::{
AreaCapacity, AreaCursor, AreaFrame, AreaFrames, AudioFrame, Continuation, CursorOptions, Demuxer,
FrameContent, FrameKind, FrameSpan, FrameStatus, Opening, Stored, TrackAudio, TrackAudioCursor,
TrackCursor, TrackFrame, TrackFrames,
};
pub use control::{CancelToken, Progress, UnreadableSectors};
pub use disc::{Disc, DiscOptions};
pub use dst::{DstDecoder, DstError};
pub use error::{EditedMasterCheck, Error, ErrorClass, OutputRefusal, Slot, Warning, WarningCode};
pub use image::{Image, ImageOptions, MASTER_TOC_LSN, SECTOR_SIZE, SectorFormat};
pub use read_at::{ReadAt, ReadAtReader};
pub use seek::{
AreaIndex, IndexOptions, ResumedFrom, SeekEvent, SeekPolicy, Speculation, SpeculativeOptions, Suspect,
};
pub use toc::{Area, AreaKind, LoudspeakerLayout, MasterToc, Speaker, Toc, Track};
const _: () = {
const fn send<T: Send>() {}
const fn sync<T: Sync>() {}
const fn both<T: Send + Sync>() {}
const fn with_send_reader<'a, R: Send + 'a>() {
send::<Disc<R>>();
send::<Image<R>>();
send::<AreaFrames<'a, R>>();
send::<TrackFrames<'a, R>>();
send::<TrackAudio<'a, R>>();
send::<ReadAtReader<R>>();
both::<read_at::Locked<R>>();
}
const fn with_sync_reader<'a, R: Sync + 'a>() {
sync::<Disc<R>>();
sync::<Image<R>>();
sync::<AreaFrames<'a, R>>();
sync::<TrackFrames<'a, R>>();
sync::<TrackAudio<'a, R>>();
sync::<ReadAtReader<R>>();
}
with_send_reader::<std::fs::File>();
with_sync_reader::<std::fs::File>();
both::<AreaCursor>();
both::<TrackCursor>();
both::<TrackAudioCursor>();
both::<Continuation<'_>>();
both::<Opening>();
both::<Demuxer>();
both::<DstDecoder>();
both::<AreaFrame>();
both::<TrackFrame>();
both::<AudioFrame>();
both::<FrameContent>();
both::<FrameKind>();
both::<FrameStatus>();
both::<Stored>();
both::<SectorFormat>();
both::<DiscOptions>();
both::<ImageOptions>();
both::<CancelToken>();
both::<UnreadableSectors>();
both::<Progress>();
both::<log::Log>();
both::<log::Level>();
both::<text::Charset>();
#[cfg(feature = "parallel")]
both::<DecodeOn>();
both::<Error>();
both::<DstError>();
both::<ErrorClass>();
both::<OutputRefusal>();
both::<EditedMasterCheck>();
both::<Slot>();
both::<Warning>();
both::<WarningCode>();
both::<Toc>();
both::<MasterToc>();
both::<Area>();
both::<Track>();
both::<AreaKind>();
both::<LoudspeakerLayout>();
both::<Speaker>();
both::<toc::Version>();
both::<toc::Genre>();
both::<toc::Date>();
both::<toc::Locale>();
both::<toc::Timecode>();
both::<toc::AreaPointer>();
both::<toc::DiscText>();
both::<toc::AreaText>();
both::<toc::TrackText>();
both::<toc::DiscTextItem>();
both::<toc::AreaTextItem>();
both::<toc::TrackTextItem>();
both::<AreaIndex>();
both::<IndexOptions>();
both::<ResumedFrom>();
both::<SeekEvent>();
both::<SeekPolicy>();
both::<Speculation>();
both::<SpeculativeOptions>();
both::<Suspect>();
#[cfg(feature = "output")]
{
both::<output::OutputOptions>();
both::<output::Layout>();
both::<output::Region>();
both::<output::RegionKind>();
both::<output::Input>();
both::<output::Format>();
both::<output::SourceTrack>();
both::<output::Tags>();
both::<output::TagSet>();
both::<output::Id3Options>();
both::<output::GenreSources>();
both::<output::Marker>();
both::<output::Comment>();
both::<output::CallerChunk>();
both::<output::DsfChainFile>();
both::<output::DstLengths>();
both::<output::AlbumArtistFrame>();
both::<output::ArrangerFrame>();
both::<output::ArtistTitleSource>();
both::<output::CommentKind>();
both::<output::DateFrame>();
both::<output::DsdiffDeparture>();
both::<output::DsfBitsPerSample>();
both::<output::DstIndexOffset>();
both::<output::Id3Encoding>();
both::<output::InfoChunk>();
both::<output::InvalidDst>();
both::<output::LocalChunk>();
both::<output::MarkerKind>();
both::<output::MarkerText>();
both::<output::Markers>();
both::<output::PropertyChunk>();
both::<output::TagItem>();
both::<output::TextSource>();
}
};