pub struct StorageSignature<'a> {
pub signature: u32,
pub major_version: u16,
pub minor_version: u16,
pub extra_data: u32,
pub version_len: u32,
pub version: &'a str,
}Expand description
Represents the signature structure for a storage header in a .NET metadata stream. This structure identifies the version and format of the metadata.
Fields§
§signature: u32Indicates the signature value, used to identify the storage structure.
major_version: u16Indicates the major version number of the metadata format.
minor_version: u16Indicates the minor version number of the metadata format.
extra_data: u32Indicates the offset to the next structure containing additional metadata information.
version_len: u32Indicates the length of the version string, in bytes.
version: &'a strIndicates the version of this metadata.
Implementations§
Source§impl<'a> StorageSignature<'a>
impl<'a> StorageSignature<'a>
pub fn parse(bytes: &'a [u8], offset: &mut usize) -> Result<Self>
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true if Self::signature matches the DOTNET_SIGNATURE, otherwise false.
Trait Implementations§
Source§impl<'a> Clone for StorageSignature<'a>
impl<'a> Clone for StorageSignature<'a>
Source§fn clone(&self) -> StorageSignature<'a>
fn clone(&self) -> StorageSignature<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for StorageSignature<'a>
impl<'a> Debug for StorageSignature<'a>
Source§impl<'a> Default for StorageSignature<'a>
impl<'a> Default for StorageSignature<'a>
Source§fn default() -> StorageSignature<'a>
fn default() -> StorageSignature<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for StorageSignature<'a>
impl<'a> PartialEq for StorageSignature<'a>
impl<'a> Copy for StorageSignature<'a>
impl<'a> StructuralPartialEq for StorageSignature<'a>
Auto Trait Implementations§
impl<'a> Freeze for StorageSignature<'a>
impl<'a> RefUnwindSafe for StorageSignature<'a>
impl<'a> Send for StorageSignature<'a>
impl<'a> Sync for StorageSignature<'a>
impl<'a> Unpin for StorageSignature<'a>
impl<'a> UnwindSafe for StorageSignature<'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
Mutably borrows from an owned value. Read more