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>
§Errors
Sourcepub fn find_error_type(
&self,
value: u32,
) -> Result<&ScSpecUdtErrorEnumCaseV0, Error>
pub fn find_error_type( &self, value: u32, ) -> Result<&ScSpecUdtErrorEnumCaseV0, Error>
§Errors
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 vec_m_to_json<const MAX: u32>(
&self,
vec_m: &VecM<ScVal, MAX>,
type_: &ScType,
) -> Result<Value, Error>
pub fn vec_m_to_json<const MAX: u32>( &self, vec_m: &VecM<ScVal, MAX>, 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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more