Struct gimli::read::Attribute[][src]

pub struct Attribute<R: Reader> { /* fields omitted */ }
Expand description

An attribute in a DebuggingInformationEntry, consisting of a name and associated value.

Implementations

Get this attribute’s name.

Get this attribute’s raw value.

Get this attribute’s normalized value.

Attribute values can potentially be encoded in multiple equivalent forms, and may have special meaning depending on the attribute name. This method converts the attribute value to a normalized form based on the attribute name.

See “Table 7.5: Attribute encodings” and “Table 7.6: Attribute form encodings”.

Try to convert this attribute’s value to a u8.

Try to convert this attribute’s value to a u16.

Try to convert this attribute’s value to an unsigned integer.

Try to convert this attribute’s value to a signed integer.

Try to convert this attribute’s value to an offset.

Try to convert this attribute’s value to an expression or location buffer.

Expressions and locations may be DW_FORM_block* or DW_FORM_exprloc. The standard doesn’t mention DW_FORM_block* as a possible form, but it is encountered in practice.

Try to return this attribute’s value as a string slice.

If this attribute’s value is either an inline DW_FORM_string string, or a DW_FORM_strp reference to an offset into the .debug_str section, return the attribute’s string value as Some. Other attribute value forms are returned as None.

Warning: this function does not handle all possible string forms. Use Dwarf::attr_string instead.

Try to return this attribute’s value as a string slice.

If this attribute’s value is either an inline DW_FORM_string string, or a DW_FORM_strp reference to an offset into the .debug_str section, or a DW_FORM_strp_sup reference to an offset into a supplementary object file, return the attribute’s string value as Some. Other attribute value forms are returned as None.

Warning: this function does not handle all possible string forms. Use Dwarf::attr_string instead.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.