pub struct Memory { /* private fields */ }Expand description
One profile’s memory file.
Implementations§
Source§impl Memory
impl Memory
pub fn new(path: impl Into<PathBuf>, budget_chars: usize) -> Self
pub fn path(&self) -> &Path
pub fn budget(&self) -> usize
Sourcepub fn read(&self) -> Result<Vec<String>>
pub fn read(&self) -> Result<Vec<String>>
The entries, in file order. A missing file is an empty memory, not an error.
Sourcepub fn size(&self) -> Result<usize>
pub fn size(&self) -> Result<usize>
Characters the rendered file occupies — what the budget actually measures.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Memory
impl Freeze for Memory
impl Move for Memory
impl RefUnwindSafe for Memory
impl Send for Memorywhere
RawVecInner: Send,
impl Sync for Memorywhere
RawVecInner: Sync,
impl Unpin for Memory
impl UnsafeUnpin for Memory
impl UnwindSafe for Memorywhere
RawVecInner: 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