Trait Categorize

Source
pub trait Categorize<X>
where X: CustomValueKind,
{ // Required method fn value_kind() -> ValueKind<X>; }
Expand description

The Categorize trait marks a rust type as having a fixed value kind for SBOR encoding/decoding.

Most rust types will have a fixed value kind in the SBOR model, and so can implement Categorize, but some (such as the SBOR Value) do not.

Implementing Categorize is required for being able to directly Encode / Decode any collection containing the rust type - because the value kind is lifted/deduplicated in the encoded payload.

If a type cannot implement Categorize, as a work-around, you can put it into a collection by (eg) wrapping it in a tuple of size 1.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, X, T> Categorize<X> for &T
where X: CustomValueKind, T: Categorize<X> + ?Sized,

Source§

impl<X> Categorize<X> for bool
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for i8
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for i16
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for i32
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for i64
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for i128
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for isize
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for str
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for u8
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for u16
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for u32
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for u64
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for u128
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for ()
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for usize
where X: CustomValueKind,

Source§

impl<X, A> Categorize<X> for (A,)
where X: CustomValueKind,

Source§

impl<X, A, B> Categorize<X> for (A, B)
where X: CustomValueKind,

Source§

impl<X, A, B, C> Categorize<X> for (A, B, C)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D> Categorize<X> for (A, B, C, D)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E> Categorize<X> for (A, B, C, D, E)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F> Categorize<X> for (A, B, C, D, E, F)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G> Categorize<X> for (A, B, C, D, E, F, G)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H> Categorize<X> for (A, B, C, D, E, F, G, H)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I> Categorize<X> for (A, B, C, D, E, F, G, H, I)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J> Categorize<X> for (A, B, C, D, E, F, G, H, I, J)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)
where X: CustomValueKind,

Source§

impl<X, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> Categorize<X> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for [T]
where X: CustomValueKind,

Source§

impl<X, T, const N: usize> Categorize<X> for [T; N]
where X: CustomValueKind,

Implementors§

Source§

impl Categorize<ManifestCustomValueKind> for AllowedIds

Source§

impl Categorize<ManifestCustomValueKind> for LowerBound

Source§

impl Categorize<ManifestCustomValueKind> for ManifestAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestComponentAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestExpression

Source§

impl Categorize<ManifestCustomValueKind> for ManifestGlobalAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestNonFungibleLocalId

Source§

impl Categorize<ManifestCustomValueKind> for ManifestPackageAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestResourceAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestResourceConstraint

Source§

impl Categorize<ManifestCustomValueKind> for UpperBound

Source§

impl Categorize<ManifestCustomValueKind> for OwnValidation

Source§

impl Categorize<ManifestCustomValueKind> for ReferenceValidation

Source§

impl Categorize<ManifestCustomValueKind> for ScryptoCustomTypeKind

Source§

impl Categorize<ManifestCustomValueKind> for ScryptoCustomTypeKindLabel

Source§

impl Categorize<ManifestCustomValueKind> for ScryptoCustomTypeValidation

Source§

impl Categorize<ManifestCustomValueKind> for NonFungibleLocalId

Source§

impl Categorize<ManifestCustomValueKind> for GenericSubstitution

Source§

impl Categorize<ManifestCustomValueKind> for RoyaltyAmount

Source§

impl Categorize<ManifestCustomValueKind> for GeneralResourceConstraint

Source§

impl Categorize<ManifestCustomValueKind> for ManifestAddressReservation

Source§

impl Categorize<ManifestCustomValueKind> for ManifestBlobRef

Source§

impl Categorize<ManifestCustomValueKind> for ManifestBucket

Source§

impl Categorize<ManifestCustomValueKind> for ManifestDecimal

Source§

impl Categorize<ManifestCustomValueKind> for ManifestNamedAddress

Source§

impl Categorize<ManifestCustomValueKind> for ManifestPreciseDecimal

Source§

impl Categorize<ManifestCustomValueKind> for ManifestProof

Source§

impl Categorize<ManifestCustomValueKind> for ManifestResourceConstraints

Source§

impl Categorize<ManifestCustomValueKind> for ManifestArgs

Source§

impl Categorize<ManifestCustomValueKind> for Reference

Source§

impl Categorize<ManifestCustomValueKind> for Decimal

Source§

impl Categorize<ManifestCustomValueKind> for PreciseDecimal

Source§

impl Categorize<ManifestCustomValueKind> for BlueprintId

Source§

impl Categorize<ManifestCustomValueKind> for BlueprintTypeIdentifier

Source§

impl Categorize<ManifestCustomValueKind> for ComponentAddress

Source§

impl Categorize<ManifestCustomValueKind> for GlobalAddress

Source§

impl Categorize<ManifestCustomValueKind> for InternalAddress

Source§

impl Categorize<ManifestCustomValueKind> for NonFungibleGlobalId

Source§

impl Categorize<ManifestCustomValueKind> for PackageAddress

Source§

impl Categorize<ManifestCustomValueKind> for ResourceAddress

Source§

impl Categorize<ScryptoCustomValueKind> for ParseBlsPublicKeyError

Source§

impl Categorize<ScryptoCustomValueKind> for ParseBlsSignatureError

Source§

impl Categorize<ScryptoCustomValueKind> for ParseEd25519PublicKeyError

Source§

impl Categorize<ScryptoCustomValueKind> for ParseEd25519SignatureError

Source§

impl Categorize<ScryptoCustomValueKind> for ParseSecp256k1PublicKeyError

Source§

impl Categorize<ScryptoCustomValueKind> for ParseSecp256k1SignatureError

Source§

impl Categorize<ScryptoCustomValueKind> for AllowedIds

Source§

impl Categorize<ScryptoCustomValueKind> for LowerBound

Source§

impl Categorize<ScryptoCustomValueKind> for ManifestResourceConstraint

Source§

impl Categorize<ScryptoCustomValueKind> for ResourceConstraintError

Source§

impl Categorize<ScryptoCustomValueKind> for ResourceConstraintsError

Source§

impl Categorize<ScryptoCustomValueKind> for UpperBound

Source§

impl Categorize<ScryptoCustomValueKind> for OwnValidation

Source§

impl Categorize<ScryptoCustomValueKind> for ReferenceValidation

Source§

impl Categorize<ScryptoCustomValueKind> for ScryptoCustomTypeKind

Source§

impl Categorize<ScryptoCustomValueKind> for ScryptoCustomTypeKindLabel

Source§

impl Categorize<ScryptoCustomValueKind> for ScryptoCustomTypeValidation

Source§

impl Categorize<ScryptoCustomValueKind> for NonFungibleLocalId

Source§

impl Categorize<ScryptoCustomValueKind> for GenericSubstitution

Source§

impl Categorize<ScryptoCustomValueKind> for GlobalCaller

Source§

impl Categorize<ScryptoCustomValueKind> for RoyaltyAmount

Source§

impl Categorize<ScryptoCustomValueKind> for GeneralResourceConstraint

Source§

impl Categorize<ScryptoCustomValueKind> for ManifestResourceConstraints

Source§

impl Categorize<ScryptoCustomValueKind> for Own

Source§

impl Categorize<ScryptoCustomValueKind> for Reference

Source§

impl Categorize<ScryptoCustomValueKind> for Decimal

Source§

impl Categorize<ScryptoCustomValueKind> for PreciseDecimal

Source§

impl Categorize<ScryptoCustomValueKind> for BlueprintId

Source§

impl Categorize<ScryptoCustomValueKind> for BlueprintTypeIdentifier

Source§

impl Categorize<ScryptoCustomValueKind> for ComponentAddress

Source§

impl Categorize<ScryptoCustomValueKind> for GlobalAddress

Source§

impl Categorize<ScryptoCustomValueKind> for GlobalAddressReservation

Source§

impl Categorize<ScryptoCustomValueKind> for InternalAddress

Source§

impl Categorize<ScryptoCustomValueKind> for NonFungibleGlobalId

Source§

impl Categorize<ScryptoCustomValueKind> for PackageAddress

Source§

impl Categorize<ScryptoCustomValueKind> for ResourceAddress

Source§

impl<'a, X, B> Categorize<X> for Cow<'a, B>
where X: CustomValueKind, B: 'a + ToOwned + Categorize<X> + ?Sized,

Source§

impl<E, X> Categorize<X> for TypeValidation<E>

Source§

impl<S, X> Categorize<X> for SchemaVersions<S>

Source§

impl<S, X> Categorize<X> for SchemaV1<S>

Source§

impl<S, X> Categorize<X> for SingleTypeSchema<S>

Source§

impl<S, X> Categorize<X> for TypeCollectionSchema<S>

Source§

impl<S, X> Categorize<X> for VersionedSchema<S>

Source§

impl<T, L, X> Categorize<X> for TypeKind<T, L>

Source§

impl<T, X> Categorize<X> for TypeKindLabel<T>

Source§

impl<T, X> Categorize<X> for NumericValidation<T>

Source§

impl<T: AsRef<NodeId>, X: CustomValueKind> Categorize<X> for FullyScopedTypeId<T>

Source§

impl<X> Categorize<X> for ChildNames
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for DecodeError
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for EncodeError
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for LocalTypeId
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for NoCustomTypeKind
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for NoCustomTypeKindLabel
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for NoCustomTypeValidation
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for RustTypeId
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for SchemaValidationError
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for LengthValidation
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for NovelTypeMetadata
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for String
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for TypeMetadata
where X: CustomValueKind,

Source§

impl<X> Categorize<X> for WellKnownTypeId
where X: CustomValueKind,

Source§

impl<X, K, V> Categorize<X> for HashMap<K, V>
where X: CustomValueKind,

Source§

impl<X, K, V> Categorize<X> for IndexMap<K, V>
where X: CustomValueKind,

Source§

impl<X, K, V> Categorize<X> for BTreeMap<K, V>
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for Option<T>
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for HashSet<T>
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for IndexSet<T>
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for Arc<T>
where X: CustomValueKind, T: Categorize<X>,

Source§

impl<X, T> Categorize<X> for BTreeSet<T>
where X: CustomValueKind,

Source§

impl<X, T> Categorize<X> for Box<T>
where X: CustomValueKind, T: Categorize<X>,

Source§

impl<X, T> Categorize<X> for Rc<T>
where X: CustomValueKind, T: Categorize<X>,

Source§

impl<X, T> Categorize<X> for RefCell<T>
where X: CustomValueKind, T: Categorize<X>,

Source§

impl<X, T> Categorize<X> for Vec<T>
where X: CustomValueKind,

Source§

impl<X, T, E> Categorize<X> for Result<T, E>
where X: CustomValueKind,

Source§

impl<X, Y> Categorize<X> for EnumVariantValue<X, Y>
where X: CustomValueKind, Y: CustomValue<X>,

Source§

impl<X, const DISCRIMINATOR: u8, T> Categorize<X> for SborFixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, T: SborTuple<X>,

Source§

impl<X: CustomValueKind> Categorize<X> for AlwaysVisibleGlobalNodesVersion

Source§

impl<X: CustomValueKind> Categorize<X> for ParseHashError

Source§

impl<X: CustomValueKind> Categorize<X> for PublicKey

Source§

impl<X: CustomValueKind> Categorize<X> for PublicKeyHash

Source§

impl<X: CustomValueKind> Categorize<X> for ScryptoCustomValueKind

Source§

impl<X: CustomValueKind> Categorize<X> for NonFungibleIdType

Source§

impl<X: CustomValueKind> Categorize<X> for RoundingMode

Source§

impl<X: CustomValueKind> Categorize<X> for BatchPartitionStateUpdate

Source§

impl<X: CustomValueKind> Categorize<X> for DatabaseUpdate

Source§

impl<X: CustomValueKind> Categorize<X> for NodeStateUpdates

Source§

impl<X: CustomValueKind> Categorize<X> for PartitionStateUpdates

Source§

impl<X: CustomValueKind> Categorize<X> for TimeComparisonOperator

Source§

impl<X: CustomValueKind> Categorize<X> for DateTimeError

Source§

impl<X: CustomValueKind> Categorize<X> for EntityType

Source§

impl<X: CustomValueKind> Categorize<X> for SubstateKey

Source§

impl<X: CustomValueKind> Categorize<X> for Bls12381G1PublicKey

Source§

impl<X: CustomValueKind> Categorize<X> for Bls12381G2Signature

Source§

impl<X: CustomValueKind> Categorize<X> for Ed25519PublicKey

Source§

impl<X: CustomValueKind> Categorize<X> for Ed25519PublicKeyHash

Source§

impl<X: CustomValueKind> Categorize<X> for Ed25519Signature

Source§

impl<X: CustomValueKind> Categorize<X> for Hash

Source§

impl<X: CustomValueKind> Categorize<X> for Secp256k1PublicKey

Source§

impl<X: CustomValueKind> Categorize<X> for Secp256k1PublicKeyHash

Source§

impl<X: CustomValueKind> Categorize<X> for Secp256k1Signature

Source§

impl<X: CustomValueKind> Categorize<X> for Secp256k1UncompressedPublicKey

Source§

impl<X: CustomValueKind> Categorize<X> for NetworkDefinition

Source§

impl<X: CustomValueKind> Categorize<X> for StateUpdates

Source§

impl<X: CustomValueKind> Categorize<X> for Instant

Source§

impl<X: CustomValueKind> Categorize<X> for UtcDateTime

Source§

impl<X: CustomValueKind> Categorize<X> for Epoch

Source§

impl<X: CustomValueKind> Categorize<X> for NodeId

Source§

impl<X: CustomValueKind> Categorize<X> for PartitionNumber

Source§

impl<X: CustomValueKind> Categorize<X> for PartitionOffset

Source§

impl<X: CustomValueKind> Categorize<X> for Round

Source§

impl<X: CustomValueKind> Categorize<X> for SchemaHash

Source§

impl<X: CustomValueKind> Categorize<X> for ScopedTypeId