Skip to main content

Nested

Struct Nested 

Source
pub struct Nested<S> { /* private fields */ }
Expand description

Backs an crate::types::object::ObjectSchema field slot with any schema whose composed representation is an crate::types::object::ObjectSchema (e.g. a derive companion from the separate formars-derive crate).

Pure delegation (NE-2): joined paths, inherited fail-fast and introspection come from the wrapped schema’s own crate::types::object::ObjectSchema::validate_at kernel — never reimplemented. The only contract is AsRef<ObjectSchema>, so the adapter stays narrow while ObjectChild remains sealed.

Implementations§

Source§

impl<S> Nested<S>

Source

pub fn new(inner: S) -> Self

Wraps a schema whose composed representation is an crate::types::object::ObjectSchema.

Trait Implementations§

Source§

impl<S: Debug> Debug for Nested<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S> ObjectChild for Nested<S>
where S: Debug + Send + Sync + AsRef<ObjectSchema> + Clone + 'static,

Source§

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

Introspection projection (delegates to the child’s own shape()).
Source§

fn meta(&self) -> &FieldMeta

UI-facing metadata slots of the child (serves ObjectSchema::field_meta).
Source§

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<S> Sealed for Nested<S>

Auto Trait Implementations§

§

impl<S> Freeze for Nested<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Nested<S>
where S: RefUnwindSafe,

§

impl<S> Send for Nested<S>
where S: Send,

§

impl<S> Sync for Nested<S>
where S: Sync,

§

impl<S> Unpin for Nested<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Nested<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Nested<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.