copyWithInner method

  1. @override
DefaultSchema<Boundary, Runtime> copyWithInner(
  1. AnyAckSchema newInner
)

Returns a copy of this wrapper with inner swapped for newInner.

Used by traversal utilities (e.g. discriminated-branch synthesis) that need to rewrite the underlying boundary schema while preserving wrapper configuration and behavior.

Implementation

@override
DefaultSchema<Boundary, Runtime> copyWithInner(AnyAckSchema newInner) {
  return DefaultSchema(
    inner: newInner as AckSchema<Boundary, Runtime>,
    defaultValue: defaultValue,
    isNullable: super.isNullable,
    isOptional: super.isOptional,
    description: description,
  );
}