core
The core library contains intrinsics and "compiler magic" functions that get extra help from the runtime to fulfill their purpose.
Types
std::core::BitfieldOrder
std::core::BitfieldOrder
std::mem::AlignTo
std::mem::AlignTo
Aligns the cursor to the given alignment
<alignment>
: The alignment to align to
std::mem::Bytes
std::mem::Bytes
A type representing a sequence of bytes without any specific meaning
<Size>
: The size of the sequence
std::mem::Endian
std::mem::Endian
The endianness of a value
std::mem::MagicSearch
std::mem::MagicSearch
Searches for a sequence of bytes and places the given type at that address
<Magic>
: The magic sequence to search for<T>
: The type to place at the address
std::mem::Reinterpreter
std::mem::Reinterpreter
Reinterprets a value as a different one
<From>
: The type to reinterpret from<To>
: The type to reinterpret to
std::mem::Section
std::mem::Section
A Handle for a custom Section
Functions
std::core::has_attribute
std::core::has_attribute
Checks if a pattern has a specific attribute assigned to it
pattern
: The pattern to checkattribute
: The attribute's name to check for
std::core::get_attribute_argument
std::core::get_attribute_argument
Returns the nth parameter of the attribute of a pattern if it has one
pattern
: The pattern to checkattribute
: The attribute's name to query[index]
: The parameter index of the attribute to return. Defaults to 0
std::core::get_attribute_value
std::core::get_attribute_value
std::core::set_endian
std::core::set_endian
Sets the current default endianness. Any patterns created following this attribute will be created using the set endianness.
endian
: The new default endianness
std::core::get_endian
std::core::get_endian
Gets the current default endianness.
return
: The currently set default endianness
std::core::set_bitfield_order
std::core::set_bitfield_order
std::core::get_bitfield_order
std::core::get_bitfield_order
std::core::array_index
std::core::array_index
When used inside of a pattern that's being created using a pattern, returns the current array index that's being processed. If used outside of an array, always yields 0.
return
: The current array index
std::core::member_count
std::core::member_count
Queries the number of members of a struct, union or bitfield or the number of entries in an array
pattern
: The pattern to checkreturn
: The number of members inpattern
std::core::has_member
std::core::has_member
Checks whether or not a given pattern has a member with a given name
pattern
: The pattern to checkname
: The name of the member to look forreturn
: True if a member calledname
exists, false otherwise
std::core::formatted_value
std::core::formatted_value
Formats a pattern using it's default formatter or its custom formatter function set through the [[format]]
or [[format_read]]
attribute
pattern
: The pattern to formatreturn
: Formatted string representation ofpattern
std::core::is_valid_enum
std::core::is_valid_enum
Checks if the given enum value corresponds has a corresponding constant
pattern
: The enum value to checkreturn
: True if pattern has a valid enum representation, false if not
std::core::set_pattern_color
std::core::set_pattern_color
Changes the color of the given pattern to a new color
pattern
: The pattern to modifycolor
: The RGBA8 color
std::core::set_display_name
std::core::set_display_name
Changes the display name of a given pattern
pattern
: The pattern to modifyname
: The new display name of the pattern
std::core::set_pattern_comment
std::core::set_pattern_comment
Changes the comment attached to a pattern
pattern
: The pattern to modifycomment
: The new comment of the pattern
std::core::execute_function
std::core::execute_function
Executes the function with the given name, passing in all given arguments
function_name
: The namespace-prefixed name of the functionargs
: Arguments to pass to the function
Last updated