pub struct CachedScan {
pub version: u32,
pub gadgets: Vec<CachedGadget>,
pub fallback_names: bool,
}Expand description
One cached scan.
Fields§
§version: u32CACHE_FORMAT_VERSION. Absent (0) in anything not written by this
crate, which fails CachedScan::validate.
gadgets: Vec<CachedGadget>The cached gadgets, in the order the scan produced them.
fallback_names: boolrf-mcp’s fallback_section_names flag.
Implementations§
Source§impl CachedScan
impl CachedScan
Sourcepub fn from_scan_gadgets(gadgets: &[Gadget]) -> Self
pub fn from_scan_gadgets(gadgets: &[Gadget]) -> Self
Build a record from an rf-scan listing (the rf-cli flavour: insns,
no rendered text).
Sourcepub fn to_scan_gadgets(&self) -> Option<Vec<Gadget>>
pub fn to_scan_gadgets(&self) -> Option<Vec<Gadget>>
Rebuild the scanner’s gadget list. None if any record is
unusable, so a partly-corrupt entry is a miss rather than a
silently short result.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Retained heap size of the whole entry: the eviction weight for
crate::MemCache. Linear in the gadget count, which is exactly
the axis MCP-05’s 2.57 GB grew along.
Trait Implementations§
Source§impl Clone for CachedScan
impl Clone for CachedScan
Source§impl Debug for CachedScan
impl Debug for CachedScan
Source§impl Default for CachedScan
impl Default for CachedScan
Source§impl<'de> Deserialize<'de> for CachedScan
impl<'de> Deserialize<'de> for CachedScan
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
Auto Trait Implementations§
impl Freeze for CachedScan
impl RefUnwindSafe for CachedScan
impl Send for CachedScan
impl Sync for CachedScan
impl Unpin for CachedScan
impl UnsafeUnpin for CachedScan
impl UnwindSafe for CachedScan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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