Skip to main content

ResolvedFile

Struct ResolvedFile 

Source
pub struct ResolvedFile {
    pub layout: RegionLayout,
    pub total_len: u64,
    pub track_id: i64,
    pub content_version: i64,
    pub backing_path: PathBuf,
    pub stamp: BackingStamp,
    pub mtime_secs: i64,
    pub last_page: Mutex<Option<(u64, u64, Vec<u8>)>>,
    pub cache_bytes: u64,
    pub streams_db_rowid: bool,
}
Expand description

A fully resolved synthesized file: its segment layout, total size, the content version it was built from, and where the backing audio lives.

Fields§

§layout: RegionLayout§total_len: u64§track_id: i64

Track id this entry resolves. Lets the stateless read path recheck the live content_version under its WAL snapshot (#502), mirroring the handle fast path’s use of the handle’s track_id.

§content_version: i64§backing_path: PathBuf§stamp: BackingStamp§mtime_secs: i64§last_page: Mutex<Option<(u64, u64, Vec<u8>)>>

One-entry memo of the last patched Ogg page, so consecutive reads skip re-patching the page straddling a chunk boundary. Empty for non-Ogg files and reset whenever this resolved entry is rebuilt. (Concrete type spelled out rather than ogg_index::LastPageMemo because that module is private.)

§cache_bytes: u64

Approximate resident bytes this entry costs the cache (sum of Inline segment bytes; backing/art/ogg-audio bytes are not resident).

§streams_db_rowid: bool

Precomputed from the layout: true if any segment is streamed from the DB by a rowid (BinaryTag/ArtImage/OggArtSlice). Gates the transactional content_version guard in the read fast path so plain Inline/BackingAudio layouts pay no per-read cost (#502).

Trait Implementations§

Source§

impl Debug for ResolvedFile

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.