-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add concept of how asn proc_macro_attributes should look like #11
- Loading branch information
1 parent
0db9fe9
commit 5239274
Showing
3 changed files
with
46 additions
and
3 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use asn1rs_macros::asn; | ||
|
||
#[asn(sequence)] | ||
#[derive(Default)] | ||
pub struct Potato { | ||
#[asn(Integer)] | ||
size: u64, | ||
#[asn(Utf8String)] | ||
string: String, | ||
} | ||
|
||
#[test] | ||
fn test_compiles() { | ||
let _ = Potato { | ||
size: 123, | ||
string: String::from("where is the content"), | ||
}; | ||
} |