From 729fce595d3547900be029544c394e3bcfd9004d Mon Sep 17 00:00:00 2001 From: Bri Wylde <92327786+briwylde08@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:47:50 -0600 Subject: [PATCH] seo-editorial-docs (#547) --- docs/fundamentals-and-concepts/custom-types.mdx | 4 ++++ static/img/stack.png | Bin 0 -> 11073 bytes 2 files changed, 4 insertions(+) create mode 100644 static/img/stack.png diff --git a/docs/fundamentals-and-concepts/custom-types.mdx b/docs/fundamentals-and-concepts/custom-types.mdx index 863ac443..fd37e9b7 100644 --- a/docs/fundamentals-and-concepts/custom-types.mdx +++ b/docs/fundamentals-and-concepts/custom-types.mdx @@ -4,6 +4,8 @@ title: Custom Types description: Struct, union, and enum types defined by contracts. --- +import stack from "../../static/img/stack.png"; + Custom types are struct, union, and enum types defined by contracts. They are usable everywhere primitives types can be used: as contract inputs, outputs, or for storage. @@ -92,6 +94,8 @@ pub enum Enum { } ``` + + When a unit variant, such as `Enum::A`, is converted to XDR, the value becomes an `ScVal`, containing an `ScVec`, containing an array with a single value, the symbol containing the variant name. diff --git a/static/img/stack.png b/static/img/stack.png new file mode 100644 index 0000000000000000000000000000000000000000..2e5804bc585b4bbc5018fe7687d54135438d429b GIT binary patch literal 11073 zcma)?_dnJD`^SxA9I{6t`-Bie_TEP}*?Wr+$6nbxGa2C+Q7I>ttV2d+udIZF?1U4? zUZ1D;Kk)tja1OU~&h6aJ>-oB_>+!hm*OhFbr%6G^OooStM*-JTGXj5mt{$WW;F(KC zx)=O``f6GD|_{Ek@NHD!R z<4(zd^V3V}yb^ruF|3xG;1q5R|j~C3R2; z^7ADMMRV|xyIgYK+Fly5hFxqbBy6o10H`C&KoH z46|X%vBW;ALG>ia#b0sX&6!Q2{~u2!7as>*PgkDXg^T6tnZKKCi#YAmZJ4n!H(&Ra zS{9HGJ4j1TF2nimF8B677w#WSN=mA%gxyl*zjNo2msf7l;^N}@$$l&(K0ZFMWp3%B ztF!auaEA&-&%jV$U*9{JpPyeMA7&K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