@blockchaincommons/uniform-resources - v1.0.0-beta.3
    Preparing search index...
    • Decode a UR with a dcbor codec whose first tag names the UR type, as the reference's URDecodable::from_ur: the UR's type must be the first tag's name (a codec's other tags do not name accepted UR types), and the codec decodes the content wrapped in that tag.

      Type Parameters

      • T

      Parameters

      • ur: UR
      • codec: CborCodec<T>

      Returns T

      TagUnnamed when the codec has no tag or its first tag has no name (the reference panics there).

      Custom when the UR's type is not the first tag's name ("expected UR type , but found ") or that name is not a UR type ("invalid UR type"), as from_ur returns a dcbor::Error; and whatever the codec throws for the content.