Struct PropertyPtrBuilder
pub struct PropertyPtrBuilder { /* private fields */ }Expand description
Builder for constructing PropertyPtr table entries
Provides a fluent interface for building PropertyPtr metadata table entries.
These entries provide indirection for property access when logical and physical
property ordering differs, enabling metadata optimizations and compressed layouts.
§Required Fields
property: Property table RID that this pointer references
§Indirection Context
The PropertyPtr table provides a mapping layer between logical property references and physical Property table entries. This enables:
- Property reordering for metadata optimization
- Compressed metadata streams with flexible property organization
- Runtime property access pattern optimizations
- Edit-and-continue property modifications without breaking references
§Examples
use dotscope::prelude::*;
// Create property pointer for property reordering
let ptr1 = PropertyPtrBuilder::new()
.property(9) // Points to Property table entry 9
.build(&mut context)?;
// Create pointer for optimized property layout
let ptr2 = PropertyPtrBuilder::new()
.property(4) // Points to Property table entry 4
.build(&mut context)?;
// Multiple pointers for complex property arrangements
let ptr3 = PropertyPtrBuilder::new()
.property(18) // Points to Property table entry 18
.build(&mut context)?;Implementations§
§impl PropertyPtrBuilder
impl PropertyPtrBuilder
pub fn new() -> Self
pub fn new() -> Self
Creates a new PropertyPtrBuilder with default values
Initializes a new builder instance with all fields unset. The caller must provide the required property RID before calling build().
§Returns
A new PropertyPtrBuilder instance ready for configuration
§Examples
use dotscope::prelude::*;
let builder = PropertyPtrBuilder::new();pub fn property(self, property: u32) -> Self
pub fn property(self, property: u32) -> Self
Sets the Property table RID
Specifies which Property table entry this pointer references. This creates the indirection mapping from the PropertyPtr RID (logical index) to the actual Property table entry (physical index).
§Parameters
property: The Property table RID to reference
§Returns
Self for method chaining
§Examples
use dotscope::prelude::*;
// Point to first property
let builder = PropertyPtrBuilder::new()
.property(1);
// Point to a later property for reordering
let builder = PropertyPtrBuilder::new()
.property(15);pub fn build(self, assembly: &mut CilAssembly) -> Result<ChangeRefRc>
pub fn build(self, assembly: &mut CilAssembly) -> Result<ChangeRefRc>
Builds and adds the PropertyPtr entry to the metadata
Validates all required fields, creates the PropertyPtr table entry,
and adds it to the assembly. Returns a token that can be used
to reference this property pointer entry.
§Parameters
assembly: Mutable reference to the CilAssembly
§Returns
Ok(Token): Token referencing the created property pointer entryErr(Error): If validation fails or table operations fail
§Errors
- Missing required field (property RID)
- Table operations fail due to metadata constraints
§Examples
use dotscope::prelude::*;
let mut assembly = CilAssembly::new(view);
let token = PropertyPtrBuilder::new()
.property(6)
.build(&mut assembly)?;Trait Implementations§
§impl Clone for PropertyPtrBuilder
impl Clone for PropertyPtrBuilder
§fn clone(&self) -> PropertyPtrBuilder
fn clone(&self) -> PropertyPtrBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PropertyPtrBuilder
impl Debug for PropertyPtrBuilder
§impl Default for PropertyPtrBuilder
impl Default for PropertyPtrBuilder
§fn default() -> Self
fn default() -> Self
Creates a default PropertyPtrBuilder
Equivalent to calling PropertyPtrBuilder::new().
Auto Trait Implementations§
impl Freeze for PropertyPtrBuilder
impl RefUnwindSafe for PropertyPtrBuilder
impl Send for PropertyPtrBuilder
impl Sync for PropertyPtrBuilder
impl Unpin for PropertyPtrBuilder
impl UnsafeUnpin for PropertyPtrBuilder
impl UnwindSafe for PropertyPtrBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.