Struct CilAssemblyViewData
pub struct CilAssemblyViewData<'a> {
pub file: Arc<File>,
pub data: &'a [u8],
pub cor20header: Cor20Header,
pub metadata_root: Root,
pub metadata_tables: Option<TablesHeader<'a>>,
pub strings: Option<Strings<'a>>,
pub userstrings: Option<UserStrings<'a>>,
pub guids: Option<Guid<'a>>,
pub blobs: Option<Blob<'a>>,
pub diagnostics: Arc<Diagnostics>,
}Expand description
Raw assembly view data holding references to file structures.
CilAssemblyViewData manages the parsed metadata structures while maintaining
direct references to the underlying file data. This structure is designed to
preserve the raw layout of metadata streams and tables as they appear in the
PE file, enabling future editing operations.
§Layout Preservation
Unlike CilObjectData which creates resolved and cross-referenced structures,
CilAssemblyViewData maintains:
- Raw metadata table data without resolution
- Direct stream references without semantic processing
- Original file offsets and layout information
- Unprocessed blob and signature data
Fields§
§file: Arc<File>Reference to the owning File structure
data: &'a [u8]Raw file data slice
cor20header: Cor20HeaderCOR20 header containing .NET-specific PE information
metadata_root: RootMetadata root header with stream directory
metadata_tables: Option<TablesHeader<'a>>Raw metadata tables header from #~ or #- stream
strings: Option<Strings<'a>>Strings heap from #Strings stream
userstrings: Option<UserStrings<'a>>User strings heap from #US stream
guids: Option<Guid<'a>>GUID heap from #GUID stream
blobs: Option<Blob<'a>>Blob heap from #Blob stream
diagnostics: Arc<Diagnostics>Diagnostics collected during loading (duplicate heaps, structural issues, etc.)
Implementations§
§impl<'a> CilAssemblyViewData<'a>
impl<'a> CilAssemblyViewData<'a>
pub fn from_dotscope_file(file: Arc<File>, data: &'a [u8]) -> Result<Self>
pub fn from_dotscope_file(file: Arc<File>, data: &'a [u8]) -> Result<Self>
Creates a new CilAssemblyViewData from file data.
This method parses the essential .NET metadata structures while preserving
their raw form. Unlike CilObjectData::from_file, this method:
- Does not resolve cross-references between tables
- Does not create semantic object representations
- Preserves original file layout information
- Focuses on structural metadata access
- Performs no validation or compliance checking
§Arguments
file- The File containing PE datadata- Raw file data slice
§Returns
Returns the parsed CilAssemblyViewData structure or an error if
essential structures cannot be located (e.g., missing CLR header).
§Errors
Returns crate::Error::NotSupported if the file is not a .NET assembly (missing CLR header).
Returns [crate::Error::OutOfBounds] if the file data is truncated or corrupted.
Auto Trait Implementations§
impl<'a> Freeze for CilAssemblyViewData<'a>
impl<'a> RefUnwindSafe for CilAssemblyViewData<'a>
impl<'a> Send for CilAssemblyViewData<'a>
impl<'a> Sync for CilAssemblyViewData<'a>
impl<'a> Unpin for CilAssemblyViewData<'a>
impl<'a> UnsafeUnpin for CilAssemblyViewData<'a>
impl<'a> UnwindSafe for CilAssemblyViewData<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for T
impl<T> Downcast for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.