pub struct ContractManifest {
pub name: Option<String>,
pub groups: Vec<ContractGroup>,
pub features: HashMap<String, Value>,
pub supported_standards: Vec<String>,
pub abi: Option<ContractABI>,
pub permissions: Vec<ContractPermission>,
pub trusts: Vec<String>,
pub extra: Option<HashMap<String, Value>>,
}
Fields§
§name: Option<String>
§groups: Vec<ContractGroup>
§features: HashMap<String, Value>
§supported_standards: Vec<String>
§abi: Option<ContractABI>
§permissions: Vec<ContractPermission>
§trusts: Vec<String>
§extra: Option<HashMap<String, Value>>
Implementations§
Source§impl ContractManifest
impl ContractManifest
pub fn new( name: Option<String>, groups: Vec<ContractGroup>, features: Option<HashMap<String, Value>>, supported_standards: Vec<String>, abi: Option<ContractABI>, permissions: Vec<ContractPermission>, trusts: Vec<String>, extra: Option<HashMap<String, Value>>, ) -> Self
pub fn get_supported_standard(&self, index: usize) -> Result<&String, TypeError>
pub fn get_first_supported_standard(&self) -> Result<&String, TypeError>
pub fn get_permission( &self, index: usize, ) -> Result<&ContractPermission, TypeError>
pub fn get_first_permission(&self) -> Result<&ContractPermission, TypeError>
pub fn get_first_trust(&self) -> Result<&String, TypeError>
pub fn get_trust(&self, index: usize) -> Result<&String, TypeError>
Trait Implementations§
Source§impl Clone for ContractManifest
impl Clone for ContractManifest
Source§fn clone(&self) -> ContractManifest
fn clone(&self) -> ContractManifest
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContractManifest
impl Debug for ContractManifest
Source§impl Default for ContractManifest
impl Default for ContractManifest
Source§fn default() -> ContractManifest
fn default() -> ContractManifest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContractManifest
impl<'de> Deserialize<'de> for ContractManifest
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
Source§impl Hash for ContractManifest
impl Hash for ContractManifest
Source§impl PartialEq for ContractManifest
impl PartialEq for ContractManifest
Auto Trait Implementations§
impl Freeze for ContractManifest
impl RefUnwindSafe for ContractManifest
impl Send for ContractManifest
impl Sync for ContractManifest
impl Unpin for ContractManifest
impl UnwindSafe for ContractManifest
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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