pub struct CoercedSchema<T: FromStr> { /* private fields */ }Expand description
Parses strings into T: FromStr — the duality citizen with
Input = String, Output = T (SC-8), mirroring HTML form input.
Implementations§
Source§impl<T: FromStr> CoercedSchema<T>
impl<T: FromStr> CoercedSchema<T>
Sourcepub fn description(self, description: &'static str) -> Self
pub fn description(self, description: &'static str) -> Self
Sets the UI description metadata slot.
Sourcepub fn placeholder(self, placeholder: &'static str) -> Self
pub fn placeholder(self, placeholder: &'static str) -> Self
Sets the UI placeholder metadata slot.
Trait Implementations§
Source§impl<T: FromStr> Clone for CoercedSchema<T>
impl<T: FromStr> Clone for CoercedSchema<T>
Source§impl<T: FromStr> Debug for CoercedSchema<T>
Type-erased debug output.
impl<T: FromStr> Debug for CoercedSchema<T>
Type-erased debug output.
Source§impl<T: FromStr + 'static> DynSchema for CoercedSchema<T>
impl<T: FromStr + 'static> DynSchema for CoercedSchema<T>
Source§fn validate_value(&self, v: &Value) -> Vec<FormaIssue>
fn validate_value(&self, v: &Value) -> Vec<FormaIssue>
Validates an erased value; issues mirror what the typed parse would report.
Source§impl<T: FromStr + ToValue + 'static> ObjectChild for CoercedSchema<T>
impl<T: FromStr + ToValue + 'static> ObjectChild for CoercedSchema<T>
Source§fn validate_at(
&self,
v: &Value,
path: &FieldPath,
_fail_fast: bool,
) -> Result<Value, Vec<FormaIssue>>
fn validate_at( &self, v: &Value, path: &FieldPath, _fail_fast: bool, ) -> Result<Value, Vec<FormaIssue>>
Validates
v addressed at path (already joined by the caller);
on full success returns the validated output converted to Value.Source§fn shape_node(&self) -> ShapeNode
fn shape_node(&self) -> ShapeNode
Introspection projection (delegates to the child’s own
shape()).Source§fn meta(&self) -> &FieldMeta
fn meta(&self) -> &FieldMeta
UI-facing metadata slots of the child (serves
ObjectSchema::field_meta).Source§fn clone_boxed(&self) -> Box<dyn ObjectChild>
fn clone_boxed(&self) -> Box<dyn ObjectChild>
Crate-internal deep-clone seam powering
ObjectSchema: Clone
(Field.child is Box<dyn ObjectChild>, which cannot be duplicated
without dispatch). Sealed: exactly six impls, all below.Source§impl<T: FromStr> Schema for CoercedSchema<T>
impl<T: FromStr> Schema for CoercedSchema<T>
impl<T: FromStr + ToValue> Sealed for CoercedSchema<T>
Auto Trait Implementations§
impl<T> !Freeze for CoercedSchema<T>
impl<T> RefUnwindSafe for CoercedSchema<T>
impl<T> Send for CoercedSchema<T>
impl<T> Sync for CoercedSchema<T>
impl<T> Unpin for CoercedSchema<T>
impl<T> UnsafeUnpin for CoercedSchema<T>
impl<T> UnwindSafe for CoercedSchema<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
Mutably borrows from an owned value. Read more