pub struct Snapshot<S: SnapshotState = Unsorted> { /* private fields */ }Implementations§
Source§impl Snapshot<Unsorted>
impl Snapshot<Unsorted>
pub fn from_extracted( header: SnapshotHeader, modules: Vec<Module>, headers: Vec<HrlFile>, ) -> Self
pub fn with_apps(self, apps: Vec<AppManifest>) -> Self
pub fn with_cuttlefish( self, schemas: Vec<SchemaFile>, partials: Vec<PartialFile>, ) -> Self
pub fn into_canonical(self) -> Snapshot<Canonical>
Source§impl<S: SnapshotState> Snapshot<S>
impl<S: SnapshotState> Snapshot<S>
pub fn header(&self) -> &SnapshotHeader
pub fn modules(&self) -> &[Module]
pub fn headers(&self) -> &[HrlFile]
pub fn apps(&self) -> &[AppManifest]
pub fn schemas(&self) -> &[SchemaFile]
pub fn partials(&self) -> &[PartialFile]
Sourcepub fn records(&self) -> impl Iterator<Item = &RecordDecl>
pub fn records(&self) -> impl Iterator<Item = &RecordDecl>
Records are declared in headers (.hrl) and inline in modules (.erl): both.
Source§impl Snapshot<Canonical>
impl Snapshot<Canonical>
Sourcepub fn lookup_export(
&self,
module: &ModuleName,
function: &FunctionName,
arity: Arity,
) -> bool
pub fn lookup_export( &self, module: &ModuleName, function: &FunctionName, arity: Arity, ) -> bool
True when module exports function/arity. O(log n): canonical
snapshots keep modules and each module’s exports sorted.
Sourcepub fn module_named(&self, name: &ModuleName) -> Option<&Module>
pub fn module_named(&self, name: &ModuleName) -> Option<&Module>
Look up a module by name in O(log n): canonical snapshots keep
modules sorted by name.
Sourcepub fn implementers_of(&self, behaviour: &ModuleName) -> Vec<&Module>
pub fn implementers_of(&self, behaviour: &ModuleName) -> Vec<&Module>
Every module whose -behaviour(B). list contains behaviour.
Reverse index over Module.behaviours; built per call (one
linear scan over self.modules). Used by behaviour-conformance
checks and the R7 suite-implementer sweep.
pub fn written_format_version(&self) -> u32
pub fn unwritable_reason(&self) -> Option<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot<Canonical>
impl<'de> Deserialize<'de> for Snapshot<Canonical>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<S: Eq + SnapshotState> Eq for Snapshot<S>
Source§impl<S: SnapshotState> Serialize for Snapshot<S>
impl<S: SnapshotState> Serialize for Snapshot<S>
impl<S: PartialEq + SnapshotState> StructuralPartialEq for Snapshot<S>
Auto Trait Implementations§
impl<S> Forget for Snapshot<S>
impl<S> Freeze for Snapshot<S>where
PhantomData<S>: Freeze,
impl<S> Move for Snapshot<S>
impl<S> RefUnwindSafe for Snapshot<S>where
PhantomData<S>: RefUnwindSafe,
impl<S> Send for Snapshot<S>where
PhantomData<S>: Send,
impl<S> Sync for Snapshot<S>where
PhantomData<S>: Sync,
impl<S> Unpin for Snapshot<S>where
PhantomData<S>: Unpin,
impl<S> UnsafeUnpin for Snapshot<S>where
PhantomData<S>: UnsafeUnpin,
impl<S> UnwindSafe for Snapshot<S>where
PhantomData<S>: UnwindSafe,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more