pub struct ProtocolOptions {
pub env: Option<CowEnv>,
pub settlement_contract_override: Option<AddressPerChain>,
pub eth_flow_contract_override: Option<AddressPerChain>,
}Expand description
Protocol-wide address and environment overrides.
Fields§
§env: Option<CowEnv>Explicit deployment environment override.
settlement_contract_override: Option<AddressPerChain>Settlement contract overrides keyed by numeric chain id.
eth_flow_contract_override: Option<AddressPerChain>EthFlow contract overrides keyed by numeric chain id.
Implementations§
Source§impl ProtocolOptions
impl ProtocolOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty options bundle.
Callers typically attach overrides through ProtocolOptions::with_env,
ProtocolOptions::with_settlement_contract_override, and
ProtocolOptions::with_eth_flow_contract_override.
Sourcepub const fn with_env(self, env: CowEnv) -> Self
pub const fn with_env(self, env: CowEnv) -> Self
Returns a copy of these options with an explicit environment override.
Sourcepub fn with_settlement_contract_override(
self,
overrides: AddressPerChain,
) -> Self
pub fn with_settlement_contract_override( self, overrides: AddressPerChain, ) -> Self
Returns a copy of these options with explicit settlement-contract overrides.
Sourcepub fn with_eth_flow_contract_override(self, overrides: AddressPerChain) -> Self
pub fn with_eth_flow_contract_override(self, overrides: AddressPerChain) -> Self
Returns a copy of these options with explicit EthFlow-contract overrides.
Trait Implementations§
Source§impl Clone for ProtocolOptions
impl Clone for ProtocolOptions
Source§fn clone(&self) -> ProtocolOptions
fn clone(&self) -> ProtocolOptions
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 ProtocolOptions
impl Debug for ProtocolOptions
Source§impl Default for ProtocolOptions
impl Default for ProtocolOptions
Source§fn default() -> ProtocolOptions
fn default() -> ProtocolOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProtocolOptions
impl<'de> Deserialize<'de> for ProtocolOptions
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
impl Eq for ProtocolOptions
Source§impl PartialEq for ProtocolOptions
impl PartialEq for ProtocolOptions
Source§fn eq(&self, other: &ProtocolOptions) -> bool
fn eq(&self, other: &ProtocolOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProtocolOptions
impl Serialize for ProtocolOptions
impl StructuralPartialEq for ProtocolOptions
Auto Trait Implementations§
impl Freeze for ProtocolOptions
impl RefUnwindSafe for ProtocolOptions
impl Send for ProtocolOptions
impl Sync for ProtocolOptions
impl Unpin for ProtocolOptions
impl UnsafeUnpin for ProtocolOptions
impl UnwindSafe for ProtocolOptions
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