Enum shuttle_core::Memo
[−]
[src]
pub enum Memo { None, Text(String), Id(u64), Hash([u8; 32]), Return([u8; 32]), }
Memo attached to transactions.
Variants
None
No memo
Text(String)
Text Memo
Id(u64)
Id Memo
Hash([u8; 32])
Hash Memo
Return([u8; 32])
Return Memo
Methods
impl Memo
[src]
fn none() -> Memo
[src]
Create new empty memo.
fn id(id: u64) -> Memo
[src]
Create new id memo.
fn text<S: Into<String>>(text: S) -> Result<Memo>
[src]
Create new text memo. text
must be shorter than 28 bytes.
fn hash(h: [u8; 32]) -> Memo
[src]
Create new hash memo.
fn return_(r: [u8; 32]) -> Memo
[src]
Create new return memo.
fn is_none(&self) -> bool
[src]
Return true
if memo is None
.
fn is_id(&self) -> bool
[src]
Return true
if memo is Id
.
fn is_text(&self) -> bool
[src]
Return true
if memo is Text
.
fn is_hash(&self) -> bool
[src]
Return true
if memo is Hash
.
fn is_return(&self) -> bool
[src]
Return true
if memo is Return
.
Trait Implementations
impl Debug for Memo
[src]
impl Clone for Memo
[src]
fn clone(&self) -> Memo
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Memo
[src]
fn eq(&self, __arg_0: &Memo) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Memo) -> bool
[src]
This method tests for !=
.
impl Eq for Memo
[src]
impl ToXdr<Memo> for Memo
[src]
fn to_xdr(&self) -> Result<Memo>
[src]
Build the object that can be serialized to XDR.
fn to_writer<W: Write>(&self, w: &mut W) -> Result<()>
[src]
Serialize to the writer w
.
fn to_base64(&self) -> Result<String>
[src]
Serialize to base64.