ZardResult<T> class
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
unwrap()
→ T
-
Returns data or throws the ZardError if parsing failed.
-
unwrapOrNull()
→ T?
-
Returns data on success, or
null on failure — never throws.
-
when<R>({required R success(T data), required R error(ZardError error)})
→ R
-
Pattern-matches on success/failure, similar to Zod's
.safeParse() handling.