Skip to main content

Field

Struct Field 

Source
pub struct Field {
    pub flags: FieldFlags,
    pub name: String,
    pub signature: FieldSig,
    pub constant: Option<Constant>,
    pub offset: Option<u32>,
    pub marshal: Option<Vec<u8>>,
    pub initial_value: Option<Vec<u8>>,
    pub impl_map: Option<ImplMap>,
    pub custom_attributes: Vec<CustomAttribute>,
    pub declaring_type: WeakEntry<TypeDef>,
}

Fields§

§flags: FieldFlags§name: String§signature: FieldSig§constant: Option<Constant>§offset: Option<u32>

Explicit offset from FieldLayout.

§marshal: Option<Vec<u8>>§initial_value: Option<Vec<u8>>

Initial data from FieldRVA.

§impl_map: Option<ImplMap>§custom_attributes: Vec<CustomAttribute>§declaring_type: WeakEntry<TypeDef>

Implementations§

Source§

impl Field

Source

pub fn new( flags: FieldFlags, name: impl Into<String>, signature: FieldSig, ) -> Self

Source

pub fn is_static(&self) -> bool

Trait Implementations§

Source§

impl Clone for Field

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Field

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Field

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl EntryName for Field

Source§

impl<'ʄ> Facet<'ʄ> for Field

Source§

const SHAPE: &'static Shape

The shape of this type, including: whether it’s a Struct, an Enum, something else? Read more
Source§

impl WriteCSharp for Field

Source§

fn write_csharp<W: Write>(&self, w: &mut CSharpWriter<W>) -> Result

Source§

fn to_csharp(&self) -> String

Source§

fn csharp(&self) -> CSharp<'_, Self>

A Display adapter.

Auto Trait Implementations§

§

impl Forget for Field

§

impl Freeze for Field
where InternalBitFlags: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<EntryInner<TypeDef>> is !null: Freeze, PhantomData<ArcInner<EntryInner<TypeDef>>>: Freeze, *const ArcInner<EntryInner<TypeRef>> is !null: Freeze, PhantomData<ArcInner<EntryInner<TypeRef>>>: Freeze, *const ArcInner<EntryInner<TypeSpec>> is !null: Freeze, PhantomData<ArcInner<EntryInner<TypeSpec>>>: Freeze, *const TypeSig is !null: Freeze, PhantomData<TypeSig>: Freeze, PhantomData<u32>: Freeze, PhantomData<i32>: Freeze, *const MethodSig is !null: Freeze, PhantomData<MethodSig>: Freeze, InternalBitFlags: Freeze, *const ArcInner<EntryInner<ModuleRef>> is !null: Freeze, PhantomData<ArcInner<EntryInner<ModuleRef>>>: Freeze, PhantomData<CustomAttribute>: Freeze,

§

impl Move for Field

§

impl RefUnwindSafe for Field

§

impl Send for Field
where InternalBitFlags: Send, RawVecInner: Send, Arc<EntryInner<TypeDef>>: Send, Arc<EntryInner<TypeRef>>: Send, Arc<EntryInner<TypeSpec>>: Send, BoxRaw<TypeSig>: Send, BoxRaw<MethodSig>: Send, InternalBitFlags: Send, Arc<EntryInner<ModuleRef>>: Send, Arc<EntryInner<Method>>: Send, Arc<EntryInner<MemberRef>>: Send, Weak<EntryInner<TypeDef>>: Send,

§

impl Sync for Field
where InternalBitFlags: Sync, RawVecInner: Sync, Arc<EntryInner<TypeDef>>: Sync, Arc<EntryInner<TypeRef>>: Sync, Arc<EntryInner<TypeSpec>>: Sync, BoxRaw<TypeSig>: Sync, BoxRaw<MethodSig>: Sync, InternalBitFlags: Sync, Arc<EntryInner<ModuleRef>>: Sync, Arc<EntryInner<Method>>: Sync, Arc<EntryInner<MemberRef>>: Sync, Weak<EntryInner<TypeDef>>: Sync,

§

impl Unpin for Field
where InternalBitFlags: Unpin, *const u8 is !null: Unpin, Arc<EntryInner<TypeDef>>: Unpin, Arc<EntryInner<TypeRef>>: Unpin, Arc<EntryInner<TypeSpec>>: Unpin, Box<TypeSig>: Unpin, Box<MethodSig>: Unpin, InternalBitFlags: Unpin, Arc<EntryInner<ModuleRef>>: Unpin, Arc<EntryInner<Method>>: Unpin, Arc<EntryInner<MemberRef>>: Unpin, *const ArcInner<EntryInner<TypeDef>> is !null: Unpin,

§

impl UnsafeUnpin for Field
where InternalBitFlags: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<EntryInner<TypeDef>> is !null: UnsafeUnpin, PhantomData<ArcInner<EntryInner<TypeDef>>>: UnsafeUnpin, *const ArcInner<EntryInner<TypeRef>> is !null: UnsafeUnpin, PhantomData<ArcInner<EntryInner<TypeRef>>>: UnsafeUnpin, *const ArcInner<EntryInner<TypeSpec>> is !null: UnsafeUnpin, PhantomData<ArcInner<EntryInner<TypeSpec>>>: UnsafeUnpin, *const TypeSig is !null: UnsafeUnpin, PhantomData<TypeSig>: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, PhantomData<i32>: UnsafeUnpin, *const MethodSig is !null: UnsafeUnpin, PhantomData<MethodSig>: UnsafeUnpin, InternalBitFlags: UnsafeUnpin, *const ArcInner<EntryInner<ModuleRef>> is !null: UnsafeUnpin, PhantomData<ArcInner<EntryInner<ModuleRef>>>: UnsafeUnpin, PhantomData<CustomAttribute>: UnsafeUnpin,

§

impl UnwindSafe for Field
where InternalBitFlags: UnwindSafe, RawVecInner: UnwindSafe, Arc<EntryInner<TypeDef>>: UnwindSafe, Arc<EntryInner<TypeRef>>: UnwindSafe, Arc<EntryInner<TypeSpec>>: UnwindSafe, BoxRaw<TypeSig>: UnwindSafe, BoxRaw<MethodSig>: UnwindSafe, InternalBitFlags: UnwindSafe, Arc<EntryInner<ModuleRef>>: UnwindSafe, Arc<EntryInner<Method>>: UnwindSafe, Arc<EntryInner<MemberRef>>: UnwindSafe, NonNull<ArcInner<EntryInner<TypeDef>>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.