Crate facet_reflect

Source
Expand description

Facet logo - a reflection library for Rust

Coverage Status free of syn crates.io documentation MIT/Apache-2.0 licensed

Logo by Misiasart

Thanks to all individual and corporate sponsors, without whom this work could not exist:

Ko-fi GitHub Sponsors Patreon Zed Depot

Allows building values, via Wip, and inspecting existing values, via PeekValue.

§License

Licensed under either of:

at your option.

Macros§

debug
Forwards to log::debug when the log feature is enabled
trace
Forwards to log::trace when the log feature is enabled

Structs§

Frame
Represents a frame in the initialization stack
FrameFlags
Flags that can be applied to frames
Guard
A guard structure to manage memory allocation and deallocation.
HeapValue
A type-erased value stored on the heap
ISet
Keeps track of which fields were initialized, up to 64 fields
Peek
Lets you read from a value (implements read-only ValueVTable proxies)
PeekEnum
Lets you read from an enum (implements read-only enum operations)
PeekList
Lets you read from a list (implements read-only facet_core::ListVTable proxies)
PeekListIter
Iterator over a PeekList
PeekListLike
Lets you read from a list, array or slice
PeekListLikeIter
Iterator over a PeekListLike
PeekMap
Lets you read from a map (implements read-only facet_core::MapVTable proxies)
PeekMapIter
Iterator over key-value pairs in a PeekMap
PeekOption
Lets you read from an option (implements read-only option operations)
PeekSmartPointer
Represents a smart pointer that can be peeked at during memory inspection.
PeekStruct
Lets you read from a struct (implements read-only struct operations)
PeekTuple
Lets you read from a tuple
ValueId
A unique identifier for a peek value
Wip
A work-in-progress heap-allocated value

Enums§

FrameMode
Represents the special mode a frame can be in
ListLikeDef
Fields for types which act like lists
ReflectError
Errors that can occur when reflecting on types.
ScalarType
All scalar types supported out of the box by peek and poke.
VariantError
Error that can occur when trying to determine variant information

Traits§

HasFields
Trait for types that have field methods

Functions§

peek_enum
Returns the enum definition if the shape represents an enum, None otherwise
peek_enum_repr
Returns the enum representation if the shape represents an enum, None otherwise
peek_enum_variants
Returns the enum variants if the shape represents an enum, None otherwise

Type Aliases§

TupleField
Field index and associated peek value