pub struct TypedPartial<'facet, 'shape, T> { /* private fields */ }Expand description
A typed wrapper around Partial, for when you want to statically
ensure that build gives you the proper type.
Implementations§
Source§impl<'facet, 'shape, T> TypedPartial<'facet, 'shape, T>
impl<'facet, 'shape, T> TypedPartial<'facet, 'shape, T>
Sourcepub fn inner_mut(&mut self) -> &mut Partial<'facet, 'shape>
pub fn inner_mut(&mut self) -> &mut Partial<'facet, 'shape>
Unwraps the underlying Partial, consuming self.
Sourcepub fn build(&mut self) -> Result<Box<T>, ReflectError<'shape>>where
T: Facet<'facet>,
'facet: 'shape,
pub fn build(&mut self) -> Result<Box<T>, ReflectError<'shape>>where
T: Facet<'facet>,
'facet: 'shape,
Builds the value and returns a Box<T>
Sourcepub fn set<U>(&mut self, value: U) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set<U>(&mut self, value: U) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Sets a value wholesale into the current frame
Sourcepub fn set_shape(
&mut self,
src_value: PtrConst<'_>,
src_shape: &'shape Shape<'shape>,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn set_shape( &mut self, src_value: PtrConst<'_>, src_shape: &'shape Shape<'shape>, ) -> Result<&mut Self, ReflectError<'shape>>
Sets a value into the current frame by shape, for shape-based operations
Sourcepub fn begin_field(
&mut self,
field_name: &str,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_field( &mut self, field_name: &str, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_field to the inner wip instance.
Sourcepub fn begin_nth_field(
&mut self,
idx: usize,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_nth_field( &mut self, idx: usize, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_nth_field to the inner wip instance.
Sourcepub fn begin_nth_element(
&mut self,
idx: usize,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_nth_element( &mut self, idx: usize, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_nth_element to the inner wip instance.
Sourcepub fn begin_smart_ptr(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_smart_ptr(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_smart_ptr to the inner wip instance.
Sourcepub fn end(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn end(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards end to the inner wip instance.
Sourcepub fn set_default(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn set_default(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards set_default to the inner wip instance.
Sourcepub fn set_from_function<F>(
&mut self,
f: F,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn set_from_function<F>( &mut self, f: F, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards set_from_function to the inner wip instance.
Sourcepub fn parse_from_str(
&mut self,
s: &str,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn parse_from_str( &mut self, s: &str, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards parse_from_str to the inner wip instance.
Sourcepub fn select_variant(
&mut self,
discriminant: i64,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn select_variant( &mut self, discriminant: i64, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_variant to the inner wip instance.
Sourcepub fn select_variant_named(
&mut self,
variant_name: &str,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn select_variant_named( &mut self, variant_name: &str, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_variant_named to the inner wip instance.
Sourcepub fn select_nth_variant(
&mut self,
index: usize,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn select_nth_variant( &mut self, index: usize, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards select_nth_variant to the inner wip instance.
Sourcepub fn begin_nth_enum_field(
&mut self,
idx: usize,
) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_nth_enum_field( &mut self, idx: usize, ) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_nth_enum_field to the inner wip instance.
Sourcepub fn begin_list(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_list(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_pushback to the inner wip instance.
Sourcepub fn begin_list_item(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_list_item(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_list_item to the inner wip instance.
Sourcepub fn begin_map(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_map(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_map to the inner wip instance.
Sourcepub fn begin_key(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_key(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_key to the inner wip instance.
Sourcepub fn begin_value(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_value(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_value to the inner wip instance.
Sourcepub fn path(&self) -> String
pub fn path(&self) -> String
Returns a human-readable path representing the current traversal in the builder,
e.g., RootStruct.fieldName[index].subfield.
Sourcepub fn set_nth_element<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_nth_element<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the nth element of an array directly to value, popping after.
Sourcepub fn set_nth_field<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_nth_field<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the field at index idx directly to value, popping after.
Sourcepub fn set_field<U>(
&mut self,
field_name: &str,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_field<U>(
&mut self,
field_name: &str,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the named field to value, popping after.
Sourcepub fn set_nth_enum_field<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_nth_enum_field<U>(
&mut self,
idx: usize,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the nth field of an enum variant directly to value, popping after.
Sourcepub fn set_key<U>(
&mut self,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_key<U>(
&mut self,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the key for a map key-value insertion, then pops after.
Sourcepub fn set_value<U>(
&mut self,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn set_value<U>(
&mut self,
value: U,
) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Convenience shortcut: sets the value for a map key-value insertion, then pops after.
Sourcepub fn push<U>(&mut self, value: U) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
pub fn push<U>(&mut self, value: U) -> Result<&mut Self, ReflectError<'shape>>where
U: Facet<'facet>,
Forwards push to the inner wip instance.
Sourcepub fn begin_some(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_some(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_some to the inner wip instance.
Sourcepub fn begin_inner(&mut self) -> Result<&mut Self, ReflectError<'shape>>
pub fn begin_inner(&mut self) -> Result<&mut Self, ReflectError<'shape>>
Forwards begin_inner to the inner wip instance.
Trait Implementations§
Auto Trait Implementations§
impl<'facet, 'shape, T> Freeze for TypedPartial<'facet, 'shape, T>
impl<'facet, 'shape, T> RefUnwindSafe for TypedPartial<'facet, 'shape, T>where
T: RefUnwindSafe,
impl<'facet, 'shape, T> !Send for TypedPartial<'facet, 'shape, T>
impl<'facet, 'shape, T> !Sync for TypedPartial<'facet, 'shape, T>
impl<'facet, 'shape, T> Unpin for TypedPartial<'facet, 'shape, T>where
T: Unpin,
impl<'facet, 'shape, T> !UnwindSafe for TypedPartial<'facet, 'shape, T>
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
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more