ReadonlynameAlways "URError"; the cross-copy identity URError.isURError checks.
ReadonlycodeThe discriminant; equals details.code.
ReadonlydetailsThe structured payload, discriminated by code.
StaticisType guard for a URError, including one from another copy of this package.
StaticinvalidThe string does not start with ur:.
StatictypeThe string has no / after the scheme, so no type.
StaticinvalidThe type uses a character outside [a-z0-9-].
StaticnotA well-formed multipart header where a single-part UR was required.
StaticunexpectedThe UR's type is found where expected was required.
StaticbytewordsStaticcborA CBOR failure; the dcbor error is the cause when one was caught.
Optionalcause: unknownStaticdecoderAnything the reference's ur crate rejects, in its words (its Error::UR).
Optionalcause: unknownStaticinvalidparameter must be requirement; value is what was received, rendered exactly.
Statictagtag has no registered name, or (undefined) the codec has no tag at all.
Thrown for malformed UR strings (
InvalidScheme,TypeUnspecified,InvalidType,NotSinglePart), a type other than the one expected (UnexpectedType), a bytewords failure indecodeBytewords(Bytewords), CBOR failures (Cbor), anything the reference'surcrate rejects inside a UR string or a part (Decoder: bytewords inside a UR string, the header, the part CBOR, the fountain decoder), an argument outside its domain (InvalidParameter) and a tag with no name to build a UR type from (TagUnnamed). Codes and messages are the reference's wherever it has an outcome; branch oncode.Instances come from the static factories only; a wrapped CBOR or part error is the
cause.Example