pub struct RTransactionSigner {
pub account: H160,
pub scopes: Vec<WitnessScope>,
pub allowed_contracts: Vec<H160>,
pub allowed_groups: Vec<String>,
pub rules: Vec<WitnessRule>,
}
Fields§
§account: H160
§scopes: Vec<WitnessScope>
§allowed_contracts: Vec<H160>
§allowed_groups: Vec<String>
§rules: Vec<WitnessRule>
Implementations§
Source§impl RTransactionSigner
impl RTransactionSigner
pub fn new(account: H160, scopes: Vec<WitnessScope>) -> Self
pub fn new_full( account: H160, scopes: Vec<WitnessScope>, allowed_contracts: Vec<H160>, allowed_groups: Vec<String>, rules: Vec<WitnessRule>, ) -> Self
pub fn get_first_scope(&self) -> Result<&WitnessScope, TypeError>
pub fn get_scope(&self, index: usize) -> Result<&WitnessScope, TypeError>
pub fn get_first_allowed_contract(&self) -> Result<&H160, TypeError>
pub fn get_allowed_contract(&self, index: usize) -> Result<&H160, TypeError>
pub fn get_first_allowed_group(&self) -> Result<&String, TypeError>
pub fn get_allowed_group(&self, index: usize) -> Result<&String, TypeError>
pub fn get_first_rule(&self) -> Result<&WitnessRule, TypeError>
pub fn get_rule(&self, index: usize) -> Result<&WitnessRule, TypeError>
Trait Implementations§
Source§impl Clone for RTransactionSigner
impl Clone for RTransactionSigner
Source§fn clone(&self) -> RTransactionSigner
fn clone(&self) -> RTransactionSigner
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 RTransactionSigner
impl Debug for RTransactionSigner
Source§impl Default for RTransactionSigner
impl Default for RTransactionSigner
Source§fn default() -> RTransactionSigner
fn default() -> RTransactionSigner
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RTransactionSigner
impl<'de> Deserialize<'de> for RTransactionSigner
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 RTransactionSigner
impl Hash for RTransactionSigner
Source§impl PartialEq for RTransactionSigner
impl PartialEq for RTransactionSigner
Source§impl Serialize for RTransactionSigner
impl Serialize for RTransactionSigner
Source§impl SignerTrait for RTransactionSigner
impl SignerTrait for RTransactionSigner
fn get_type(&self) -> SignerType
fn get_signer_hash(&self) -> &H160
fn set_signer_hash(&mut self, signer_hash: H160)
fn get_scopes(&self) -> &Vec<WitnessScope>
fn get_scopes_mut(&mut self) -> &mut Vec<WitnessScope>
fn set_scopes(&mut self, scopes: Vec<WitnessScope>)
fn get_allowed_contracts(&self) -> &Vec<H160>
fn get_allowed_contracts_mut(&mut self) -> &mut Vec<H160>
fn get_allowed_groups(&self) -> &Vec<Secp256r1PublicKey>
fn get_allowed_groups_mut(&mut self) -> &mut Vec<Secp256r1PublicKey>
fn get_rules(&self) -> &Vec<WitnessRule>
fn get_rules_mut(&mut self) -> &mut Vec<WitnessRule>
fn set_allowed_contracts( &mut self, contracts: Vec<H160>, ) -> Result<(), BuilderError>
fn set_allowed_groups( &mut self, groups: Vec<Secp256r1PublicKey>, ) -> Result<(), BuilderError>
fn set_rules( &mut self, rules: Vec<WitnessRule>, ) -> Result<&mut Self, BuilderError>
fn check_depth( &self, condition: &WitnessCondition, depth: i8, ) -> Result<(), BuilderError>
fn validate_subitems( &self, count: usize, _name: &str, ) -> Result<(), BuilderError>
impl StructuralPartialEq for RTransactionSigner
Auto Trait Implementations§
impl Freeze for RTransactionSigner
impl RefUnwindSafe for RTransactionSigner
impl Send for RTransactionSigner
impl Sync for RTransactionSigner
impl Unpin for RTransactionSigner
impl UnwindSafe for RTransactionSigner
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