Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fine-tuning the
C API
(#75)
- Loading branch information
1 parent
c8aaa6f
commit bcddf22589f33f3045d7c66df9651f5d5d7489f8
Showing
10 changed files
with
366 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,19 @@ | ||
use crate::{impl_from_svm_byte_array, impl_into_svm_byte_array}; | ||
|
||
use svm_common::Address; | ||
|
||
/// | ||
/// # Example | ||
/// | ||
/// ```rust | ||
/// use svm_common::Address; | ||
/// use svm_runtime_c_api::svm_byte_array; | ||
/// | ||
/// let bytes: svm_byte_array = Address:of("@someone").into(); | ||
/// | ||
/// let addr: Result<Address, String> = bytes.into(); | ||
/// assert_eq!(Address::of("@someone"), addr.unwrap()); | ||
/// ``` | ||
/// | ||
impl_from_svm_byte_array!(Address); | ||
impl_into_svm_byte_array!(Address); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.