pub enum Network {
Mainnet,
Testnet,
Devnet,
Local,
Custom,
}Expand description
Known Aptos networks.
Variants§
Mainnet
Aptos mainnet
Testnet
Aptos testnet
Devnet
Aptos devnet
Local
Local development network
Custom
Custom network
Implementations§
Source§impl Network
impl Network
Sourcepub fn chain_id(&self) -> ChainId
pub fn chain_id(&self) -> ChainId
Returns the chain ID for this network.
Devnet’s chain ID is intentionally returned as 0 (unknown) because
it is reset on a regular cadence and any hardcoded value rapidly
goes stale. Returning 0 causes crate::Aptos::ensure_chain_id to
fetch the live chain ID from the configured fullnode and cache it.
Trait Implementations§
impl Copy for Network
impl Eq for Network
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
impl UnwindSafe for Network
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,
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.