Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
seo-editorial-docs (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
briwylde08 authored Aug 16, 2023
1 parent 57d894f commit 729fce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/fundamentals-and-concepts/custom-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -92,6 +94,8 @@ pub enum Enum {
}
```

<img src={stack} width="10%" />

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.
Expand Down
Binary file added static/img/stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 729fce5

Please sign in to comment.