Crate facet_poke

Crate facet_poke 

Source
Expand description

Facet logo - a reflection library for Rust   facet-poke

experimental 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

Provides tools for building and altering arbitrary Facet types.

§License

Licensed under either of:

at your option.

Structs§

Guard
Ensures a value is dropped when the guard is dropped.
ISet
Keeps track of which fields were initialized, up to 64 fields
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
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)
PeekStruct
Lets you read from a struct (implements read-only struct operations)
PeekValue
Lets you read from a value (implements read-only ValueVTable proxies)
PokeEnum
Allows poking an enum with a selected variant (setting fields, etc.)
PokeEnumNoVariant
Represents an enum before a variant has been selected
PokeList
Allows poking a list (appending, etc.)
PokeListUninit
Allows initializing an uninitialized list
PokeMap
Allows poking a map (inserting, etc.)
PokeMapUninit
Allows initializing an uninitialized map
PokeOption
Allows poking an option (setting Some/None)
PokeOptionUninit
Allows initializing an uninitialized option
PokeStruct
Allows poking a struct (setting fields, etc.)
PokeValue
Lets you modify an initialized value (implements read-write ValueVTable proxies)
PokeValueUninit
Lets you write to a value (implements write-only ValueVTable proxies)
TypedPokeValue
A strongly-typed value writer for initialized values that ensures type safety at compile-time
TypedPokeValueUninit
A strongly-typed value writer that ensures type safety at compile-time

Enums§

Peek
Lets you peek at the innards of a value
Poke
Allows manipulating already-initialized values of different kinds.
PokeUninit
Allows initializing values of different kinds.
VariantError
All possible errors when getting a variant by index or by name

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
peek_option
Returns the option definition if the shape represents an option, None otherwise