Enum ImportKind
#[repr(u8)]pub enum ImportKind {
ImportNamespace = 1,
ImportAssemblyNamespace = 2,
ImportType = 3,
ImportXmlNamespace = 4,
ImportAssemblyReferenceAlias = 5,
DefineAssemblyAlias = 6,
DefineNamespaceAlias = 7,
DefineAssemblyNamespaceAlias = 8,
DefineTypeAlias = 9,
}Expand description
Import declaration kinds as defined in the Portable PDB format specification.
These constants define the different types of import declarations that can appear in an imports blob. Each kind determines the structure and parameters of the following import data.
§Format Specification
Each import kind corresponds to a specific binary format in the imports blob:
- Values 1-9 are defined by the Portable PDB specification
- Each kind has different parameter requirements (namespace, assembly, type, alias)
- Kind values are encoded as compressed unsigned integers in the blob
§Examples
use dotscope::metadata::importscope::ImportKind;
// Convert from blob data
let kind = ImportKind::from_u32(1);
assert_eq!(kind, Some(ImportKind::ImportNamespace));
// Check kind values
assert_eq!(ImportKind::ImportType as u8, 3);§Thread Safety
ImportKind is std::marker::Send and std::marker::Sync as it contains only primitive data.
Instances can be safely shared across threads and accessed concurrently.
Variants§
ImportNamespace = 1
Import namespace members
ImportAssemblyNamespace = 2
Import namespace members from specific assembly
ImportType = 3
Import type members
ImportXmlNamespace = 4
Import XML namespace with prefix
ImportAssemblyReferenceAlias = 5
Import assembly reference alias from ancestor scope
DefineAssemblyAlias = 6
Define assembly alias
DefineNamespaceAlias = 7
Define namespace alias
DefineAssemblyNamespaceAlias = 8
Define namespace alias from specific assembly
DefineTypeAlias = 9
Define type alias
Implementations§
§impl ImportKind
impl ImportKind
pub fn from_u32(value: u32) -> Option<Self>
pub fn from_u32(value: u32) -> Option<Self>
Create an ImportKind from a compressed unsigned integer value.
This method accepts u32 to match the output of compressed integer parsing
functions used in the binary parser, even though valid values (1-9) fit in a u8.
§Arguments
value- The kind value from the imports blob. Valid values are 1-9; values outside this range returnNone.
§Returns
Trait Implementations§
§impl Clone for ImportKind
impl Clone for ImportKind
§fn clone(&self) -> ImportKind
fn clone(&self) -> ImportKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ImportKind
§impl Debug for ImportKind
impl Debug for ImportKind
impl Eq for ImportKind
§impl PartialEq for ImportKind
impl PartialEq for ImportKind
impl StructuralPartialEq for ImportKind
Auto Trait Implementations§
impl Freeze for ImportKind
impl RefUnwindSafe for ImportKind
impl Send for ImportKind
impl Sync for ImportKind
impl Unpin for ImportKind
impl UnsafeUnpin for ImportKind
impl UnwindSafe for ImportKind
Blanket Implementations§
impl<T> Boilerplate for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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,
impl<T> Scalar for T
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.