pub struct MappedCodeGraph { /* private fields */ }Expand description
A memory-mapped view of an .acb file.
This wraps the mmap and provides access to the graph data without loading the entire file into heap memory.
Implementations§
Source§impl MappedCodeGraph
impl MappedCodeGraph
Sourcepub fn open(path: &Path) -> AcbResult<Self>
pub fn open(path: &Path) -> AcbResult<Self>
Open and memory-map an .acb file.
The file is mapped read-only. The graph is parsed from the mapped data.
§Safety
This uses unsafe internally for mmap. The file must not be modified
while the mapping is active.
Sourcepub fn into_graph(self) -> CodeGraph
pub fn into_graph(self) -> CodeGraph
Consume and return the parsed graph (drops the mmap).
Auto Trait Implementations§
impl Freeze for MappedCodeGraph
impl RefUnwindSafe for MappedCodeGraph
impl Send for MappedCodeGraph
impl Sync for MappedCodeGraph
impl Unpin for MappedCodeGraph
impl UnsafeUnpin for MappedCodeGraph
impl UnwindSafe for MappedCodeGraph
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