//! I currently only support the schism tracker file format. use core::num::NonZeroU32; pub mod err; pub mod header; pub mod instrument; pub mod pattern; pub mod sample; #[derive(Debug, Clone, Copy, PartialEq, Eq)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct InFilePtr(pub(crate) core::num::NonZeroU32); impl InFilePtr { pub fn get(self) -> NonZeroU32 { self.0 } } /// the usize in both variants gives the amount of read or written bytes. If this is zero then it needs a bigger slice at that point /// in the parsing. Every function should document what the biggest required slice is, so just using that size everytime /// should be possible. /// /// Polling a parser after it was done will return Pending(0) #[derive(Debug)] pub enum SansIO { Finished(F, usize), Pending(usize), } type SansIOWritten = SansIO<()>;