pub struct ContractSpec {
pub article: Option<Article>,
pub name: Name,
pub details: Option<Details>,
pub precision: Precision,
}Fields§
§article: Option<Article>§name: Name§details: Option<Details>§precision: PrecisionImplementations§
Source§impl ContractSpec
impl ContractSpec
pub fn new(name: &'static str, precision: Precision) -> ContractSpec
pub fn with( article: &str, name: &str, precision: Precision, details: Option<&str>, ) -> Result<ContractSpec, InvalidRString>
pub fn from_strict_val_unchecked(value: &StrictVal) -> ContractSpec
pub fn article(&self) -> Option<&str>
pub fn name(&self) -> &str
pub fn details(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for ContractSpec
impl Clone for ContractSpec
Source§fn clone(&self) -> ContractSpec
fn clone(&self) -> ContractSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContractSpec
impl Debug for ContractSpec
Source§impl<'de> Deserialize<'de> for ContractSpec
impl<'de> Deserialize<'de> for ContractSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContractSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContractSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContractSpec
Source§impl Hash for ContractSpec
impl Hash for ContractSpec
Source§impl PartialEq for ContractSpec
impl PartialEq for ContractSpec
Source§impl Serialize for ContractSpec
impl Serialize for ContractSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for ContractSpec
impl StrictDecode for ContractSpec
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<ContractSpec, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for ContractSpec
impl StrictDeserialize for ContractSpec
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for ContractSpec
impl StrictDumb for ContractSpec
fn strict_dumb() -> ContractSpec
Source§impl StrictEncode for ContractSpec
impl StrictEncode for ContractSpec
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
impl StrictProduct for ContractSpec
Source§impl StrictSerialize for ContractSpec
impl StrictSerialize for ContractSpec
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictStruct for ContractSpec
impl StrictStruct for ContractSpec
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for ContractSpec
impl StrictType for ContractSpec
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_CONTRACT
fn strict_name() -> Option<TypeName>
impl StructuralPartialEq for ContractSpec
Auto Trait Implementations§
impl Freeze for ContractSpec
impl RefUnwindSafe for ContractSpec
impl Send for ContractSpec
impl Sync for ContractSpec
impl Unpin for ContractSpec
impl UnsafeUnpin for ContractSpec
impl UnwindSafe for ContractSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.