#[repr(i32)]pub enum NetworkEnvironment {
Main = 0,
Test = 1,
Dev = 2,
Staging = 3,
Perf = 4,
Integration = 5,
Local = 6,
Debug = 7,
All = 8,
Predev = 9,
}Variants§
Main = 0
Production release, using real data and currency
Test = 1
Pre-production release, used for integration testing with release version before updating main net
Dev = 2
Latest dev branch code, continuously updated from latest build, unstable and non-release version
Staging = 3
Latest staging branch code, continuously updated but considered stable, upon verification is rolled to test net
Perf = 4
Performance testing network, used for debugging performance issues and not tied to a particular version or stage Can be manually set as for debugging, generally paired with staging code.
Integration = 5
Manually deployed network over arbitrary machines
Local = 6
Designation for an entire network running as local processes not connecting to external services
Debug = 7
Designation for an entire network running within a single process. Either with mock-ups or other testing harnesses – generally used for debugging within an IDE,
All = 8
Operations which can potentially span all networks, like a host manager or infrastructure configuration.
Predev = 9
Testing branch before dev, force push commits here for manual debugging, one user at a time.
Implementations§
Source§impl NetworkEnvironment
impl NetworkEnvironment
pub fn btc_explorer_link(&self) -> String
pub fn btc_address_link(&self, address: String) -> String
pub fn btc_tx_link(&self, address: String) -> String
pub fn eth_explorer_link(&self) -> String
pub fn eth_address_link(&self, eth_address: String) -> String
pub fn eth_tx_link(&self, txid: String) -> String
pub fn explorer_link(&self) -> String
pub fn explorer_hash_link(&self, hash: String) -> String
pub fn to_std_string(&self) -> String
pub fn parse(from_str: String) -> Self
pub fn parse_safe(from_str: String) -> Result<Self, ErrorInfo>
pub fn from_std_string(s: impl Into<String>) -> RgResult<Self>
pub fn status_networks() -> Vec<NetworkEnvironment>
pub fn gui_networks() -> Vec<NetworkEnvironment>
pub fn is_local_debug(&self) -> bool
pub fn is_main_stage_network(&self) -> bool
pub fn is_all(&self) -> bool
pub fn is_main(&self) -> bool
pub fn is_dev(&self) -> bool
pub fn default_port_offset(&self) -> u16
Trait Implementations§
Source§impl Clone for NetworkEnvironment
impl Clone for NetworkEnvironment
Source§fn clone(&self) -> NetworkEnvironment
fn clone(&self) -> NetworkEnvironment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkEnvironment
impl Debug for NetworkEnvironment
Source§impl Default for NetworkEnvironment
impl Default for NetworkEnvironment
Source§fn default() -> NetworkEnvironment
fn default() -> NetworkEnvironment
Source§impl<'de> Deserialize<'de> for NetworkEnvironment
impl<'de> Deserialize<'de> for NetworkEnvironment
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>,
Source§impl From<NetworkEnvironment> for i32
impl From<NetworkEnvironment> for i32
Source§fn from(value: NetworkEnvironment) -> i32
fn from(value: NetworkEnvironment) -> i32
Source§impl FromStr for NetworkEnvironment
impl FromStr for NetworkEnvironment
Source§impl Hash for NetworkEnvironment
impl Hash for NetworkEnvironment
Source§impl IntoEnumIterator for NetworkEnvironment
impl IntoEnumIterator for NetworkEnvironment
type Iterator = NetworkEnvironmentIter
fn iter() -> NetworkEnvironmentIter ⓘ
Source§impl Ord for NetworkEnvironment
impl Ord for NetworkEnvironment
Source§fn cmp(&self, other: &NetworkEnvironment) -> Ordering
fn cmp(&self, other: &NetworkEnvironment) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NetworkEnvironment
impl PartialEq for NetworkEnvironment
Source§impl PartialOrd for NetworkEnvironment
impl PartialOrd for NetworkEnvironment
Source§impl Serialize for NetworkEnvironment
impl Serialize for NetworkEnvironment
Source§impl TryFrom<&str> for NetworkEnvironment
impl TryFrom<&str> for NetworkEnvironment
impl Copy for NetworkEnvironment
impl Eq for NetworkEnvironment
impl StructuralPartialEq for NetworkEnvironment
Auto Trait Implementations§
impl Freeze for NetworkEnvironment
impl RefUnwindSafe for NetworkEnvironment
impl Send for NetworkEnvironment
impl Sync for NetworkEnvironment
impl Unpin for NetworkEnvironment
impl UnwindSafe for NetworkEnvironment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.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>
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>
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