pub struct AutoloadEntry {
pub binary_mtime_at_cache: i64,
pub binary_len_at_cache: u64,
pub cached_at_secs: i64,
pub source_dir: String,
pub source_sha: [u8; 32],
pub chunk_blob: Vec<u8>,
pub resolved: Option<ResolvedLoad>,
}Expand description
AutoloadEntry — see fields for layout.
Fields§
§binary_mtime_at_cache: i64mtime of the zshrs binary that emitted chunk_blob.
binary_len_at_cache: u64Byte length of that binary. Paired with the mtime because two different builds can land in the same second, and a debug build and a release build differ enormously in size.
cached_at_secs: i64cached_at_secs field.
source_dir: StringThe fpath directory the definition was resolved from. The cache
is keyed by function NAME, and a real $fpath has the same name
in several directories, so the winner has to be recorded.
source_sha: [u8; 32]SHA-256 of the exact definition text that produced chunk_blob
— name() { <body> } as the loader builds it. Hashing the text
rather than stat-ing a file is what makes a .zwc-digest body
and a plain-file body distinguishable.
chunk_blob: Vec<u8>bincode of the fusevm::Chunk for the definition program.
resolved: Option<ResolvedLoad>Everything the $fpath search and the file read produced for this
function, so the next load needs neither (see try_resolve).
None for an entry written without it; that entry is still served by
(dir, sha) after a search.
Trait Implementations§
Source§impl Archive for AutoloadEntry
impl Archive for AutoloadEntry
Source§type Archived = ArchivedAutoloadEntry
type Archived = ArchivedAutoloadEntry
Source§type Resolver = AutoloadEntryResolver
type Resolver = AutoloadEntryResolver
Source§impl Clone for AutoloadEntry
impl Clone for AutoloadEntry
Source§impl Debug for AutoloadEntry
impl Debug for AutoloadEntry
Source§impl<__D: Fallible + ?Sized> Deserialize<AutoloadEntry, __D> for Archived<AutoloadEntry>where
i64: Archive,
Archived<i64>: Deserialize<i64, __D>,
u64: Archive,
Archived<u64>: Deserialize<u64, __D>,
String: Archive,
Archived<String>: Deserialize<String, __D>,
[u8; 32]: Archive,
Archived<[u8; 32]>: Deserialize<[u8; 32], __D>,
Vec<u8>: Archive,
Archived<Vec<u8>>: Deserialize<Vec<u8>, __D>,
Option<ResolvedLoad>: Archive,
Archived<Option<ResolvedLoad>>: Deserialize<Option<ResolvedLoad>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<AutoloadEntry, __D> for Archived<AutoloadEntry>where
i64: Archive,
Archived<i64>: Deserialize<i64, __D>,
u64: Archive,
Archived<u64>: Deserialize<u64, __D>,
String: Archive,
Archived<String>: Deserialize<String, __D>,
[u8; 32]: Archive,
Archived<[u8; 32]>: Deserialize<[u8; 32], __D>,
Vec<u8>: Archive,
Archived<Vec<u8>>: Deserialize<Vec<u8>, __D>,
Option<ResolvedLoad>: Archive,
Archived<Option<ResolvedLoad>>: Deserialize<Option<ResolvedLoad>, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<AutoloadEntry, __D::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<AutoloadEntry, __D::Error>
Auto Trait Implementations§
impl Freeze for AutoloadEntry
impl RefUnwindSafe for AutoloadEntry
impl Send for AutoloadEntry
impl Sync for AutoloadEntry
impl Unpin for AutoloadEntry
impl UnsafeUnpin for AutoloadEntry
impl UnwindSafe for AutoloadEntry
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be unsized. Read moreSource§type MetadataResolver = ()
type MetadataResolver = ()
Source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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