pub enum IdlTypeSnapshot {
Simple(String),
Array(IdlArrayTypeSnapshot),
Option(IdlOptionTypeSnapshot),
Vec(IdlVecTypeSnapshot),
Defined(IdlDefinedTypeSnapshot),
}Expand description
Type representation from IDL
Variants§
Simple(String)
Simple types: “u64”, “bool”, “string”, “pubkey”, etc.
Array(IdlArrayTypeSnapshot)
Array type: { “array”: [“u8”, 32] }
Option(IdlOptionTypeSnapshot)
Option type: { “option”: “u64” }
Vec(IdlVecTypeSnapshot)
Vec type: { “vec”: “u8” }
Defined(IdlDefinedTypeSnapshot)
Defined/custom type: { “defined”: { “name”: “MyStruct” } }
Implementations§
Source§impl IdlTypeSnapshot
impl IdlTypeSnapshot
Sourcepub fn to_rust_type_string(&self) -> String
pub fn to_rust_type_string(&self) -> String
Convert IDL type to Rust type string
Trait Implementations§
Source§impl Clone for IdlTypeSnapshot
impl Clone for IdlTypeSnapshot
Source§fn clone(&self) -> IdlTypeSnapshot
fn clone(&self) -> IdlTypeSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IdlTypeSnapshot
impl Debug for IdlTypeSnapshot
Source§impl<'de> Deserialize<'de> for IdlTypeSnapshot
impl<'de> Deserialize<'de> for IdlTypeSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IdlTypeSnapshot
impl RefUnwindSafe for IdlTypeSnapshot
impl Send for IdlTypeSnapshot
impl Sync for IdlTypeSnapshot
impl Unpin for IdlTypeSnapshot
impl UnwindSafe for IdlTypeSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more