Struct soroban_cli::strval::Spec
source · pub struct Spec(pub Option<Vec<ScSpecEntry>>);Tuple Fields§
§0: Option<Vec<ScSpecEntry>>Implementations§
source§impl Spec
impl Spec
sourcepub fn doc(
&self,
name: &str,
type_: &ScType
) -> Result<Option<&'static str>, Error>
pub fn doc( &self, name: &str, type_: &ScType ) -> Result<Option<&'static str>, Error>
Errors
Could fail to find User Defined Type
sourcepub fn find_function(&self, name: &str) -> Result<&ScSpecFunctionV0, Error>
pub fn find_function(&self, name: &str) -> Result<&ScSpecFunctionV0, Error>
Errors
Might return errors
sourcepub fn find_functions(
&self
) -> Result<impl Iterator<Item = &ScSpecFunctionV0>, Error>
pub fn find_functions( &self ) -> Result<impl Iterator<Item = &ScSpecFunctionV0>, Error>
sourcepub fn from_string_primitive(s: &str, t: &ScType) -> Result<ScVal, Error>
pub fn from_string_primitive(s: &str, t: &ScType) -> Result<ScVal, Error>
Errors
Might return errors
source§impl Spec
impl Spec
sourcepub fn xdr_to_json(&self, val: &ScVal, output: &ScType) -> Result<Value, Error>
pub fn xdr_to_json(&self, val: &ScVal, output: &ScType) -> Result<Value, Error>
sourcepub fn vec_m_to_json(
&self,
vec_m: &VecM<ScVal, 256_000>,
type_: &ScType
) -> Result<Value, Error>
pub fn vec_m_to_json( &self, vec_m: &VecM<ScVal, 256_000>, type_: &ScType ) -> Result<Value, Error>
Errors
Might return an error
sourcepub fn sc_map_to_json(
&self,
sc_map: &ScMap,
type_: &ScSpecTypeMap
) -> Result<Value, Error>
pub fn sc_map_to_json( &self, sc_map: &ScMap, type_: &ScSpecTypeMap ) -> Result<Value, Error>
Errors
Might return an error
sourcepub fn sc_set_to_json(
&self,
sc_map: &ScMap,
type_: &ScSpecTypeSet
) -> Result<Value, Error>
pub fn sc_set_to_json( &self, sc_map: &ScMap, type_: &ScSpecTypeSet ) -> Result<Value, Error>
Errors
Might return an error
sourcepub fn udt_to_json(
&self,
name: &StringM<60>,
sc_obj: &ScVal
) -> Result<Value, Error>
pub fn udt_to_json( &self, name: &StringM<60>, sc_obj: &ScVal ) -> Result<Value, Error>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
Blanket Implementations§
§impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.