pub enum NetworkType {
Mainnet,
Testnet,
Devnet,
Simnet,
}Expand description
@category Consensus
Variants§
Implementations§
Source§impl NetworkType
impl NetworkType
pub fn default_rpc_port(&self) -> u16
pub fn default_borsh_rpc_port(&self) -> u16
pub fn default_json_rpc_port(&self) -> u16
pub fn iter() -> impl Iterator<Item = NetworkType>
Trait Implementations§
Source§impl BorshDeserialize for NetworkType
impl BorshDeserialize for NetworkType
fn deserialize_reader<__R>(reader: &mut __R) -> Result<NetworkType, Error>where
__R: Read,
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for NetworkType
impl BorshSerialize for NetworkType
Source§impl Clone for NetworkType
impl Clone for NetworkType
Source§fn clone(&self) -> NetworkType
fn clone(&self) -> NetworkType
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NetworkType
impl Debug for NetworkType
Source§impl<'de> Deserialize<'de> for NetworkType
impl<'de> Deserialize<'de> for NetworkType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NetworkType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for NetworkType
impl Display for NetworkType
Source§impl EnumExt for NetworkType
impl EnumExt for NetworkType
Source§fn deserialize_variant<__R>(
reader: &mut __R,
variant_tag: u8,
) -> Result<NetworkType, Error>where
__R: Read,
fn deserialize_variant<__R>(
reader: &mut __R,
variant_tag: u8,
) -> Result<NetworkType, Error>where
__R: Read,
Deserialises given variant of an enum from the reader. Read more
Source§impl From<NetworkId> for NetworkType
impl From<NetworkId> for NetworkType
Source§fn from(net: NetworkId) -> NetworkType
fn from(net: NetworkId) -> NetworkType
Converts to this type from the input type.
Source§impl From<NetworkType> for JsValue
impl From<NetworkType> for JsValue
Source§fn from(value: NetworkType) -> JsValue
fn from(value: NetworkType) -> JsValue
Converts to this type from the input type.
Source§impl From<NetworkType> for Params
impl From<NetworkType> for Params
Source§fn from(value: NetworkType) -> Params
fn from(value: NetworkType) -> Params
Converts to this type from the input type.
Source§impl FromStr for NetworkType
impl FromStr for NetworkType
Source§type Err = NetworkTypeError
type Err = NetworkTypeError
The associated error which can be returned from parsing.
Source§fn from_str(
network_type: &str,
) -> Result<NetworkType, <NetworkType as FromStr>::Err>
fn from_str( network_type: &str, ) -> Result<NetworkType, <NetworkType as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl FromWasmAbi for NetworkType
impl FromWasmAbi for NetworkType
Source§impl Hash for NetworkType
impl Hash for NetworkType
Source§impl IntoWasmAbi for NetworkType
impl IntoWasmAbi for NetworkType
Source§impl OptionFromWasmAbi for NetworkType
impl OptionFromWasmAbi for NetworkType
Source§fn is_none(val: &<NetworkType as FromWasmAbi>::Abi) -> bool
fn is_none(val: &<NetworkType as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.Source§impl OptionIntoWasmAbi for NetworkType
impl OptionIntoWasmAbi for NetworkType
Source§fn none() -> <NetworkType as IntoWasmAbi>::Abi
fn none() -> <NetworkType as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read moreSource§impl Ord for NetworkType
impl Ord for NetworkType
Source§impl PartialEq for NetworkType
impl PartialEq for NetworkType
Source§impl PartialOrd for NetworkType
impl PartialOrd for NetworkType
Source§impl Serialize for NetworkType
impl Serialize for NetworkType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&NetworkTypeT> for NetworkType
impl TryFrom<&NetworkTypeT> for NetworkType
Source§type Error = NetworkTypeError
type Error = NetworkTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &NetworkTypeT,
) -> Result<NetworkType, <NetworkType as TryFrom<&NetworkTypeT>>::Error>
fn try_from( value: &NetworkTypeT, ) -> Result<NetworkType, <NetworkType as TryFrom<&NetworkTypeT>>::Error>
Performs the conversion.
Source§impl TryFrom<NetworkType> for NetworkId
impl TryFrom<NetworkType> for NetworkId
Source§type Error = NetworkIdError
type Error = NetworkIdError
The type returned in the event of a conversion error.
Source§fn try_from(
value: NetworkType,
) -> Result<NetworkId, <NetworkId as TryFrom<NetworkType>>::Error>
fn try_from( value: NetworkType, ) -> Result<NetworkId, <NetworkId as TryFrom<NetworkType>>::Error>
Performs the conversion.
Source§impl TryFrom<Prefix> for NetworkType
impl TryFrom<Prefix> for NetworkType
Source§type Error = NetworkTypeError
type Error = NetworkTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
prefix: Prefix,
) -> Result<NetworkType, <NetworkType as TryFrom<Prefix>>::Error>
fn try_from( prefix: Prefix, ) -> Result<NetworkType, <NetworkType as TryFrom<Prefix>>::Error>
Performs the conversion.
Source§impl TryFromJsValue for NetworkType
impl TryFromJsValue for NetworkType
Source§fn try_from_js_value_ref(value: &JsValue) -> Option<NetworkType>
fn try_from_js_value_ref(value: &JsValue) -> Option<NetworkType>
Performs the conversion.
Source§impl VectorFromWasmAbi for NetworkType
impl VectorFromWasmAbi for NetworkType
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <NetworkType as VectorFromWasmAbi>::Abi, ) -> Box<[NetworkType]>
Source§impl VectorIntoWasmAbi for NetworkType
impl VectorIntoWasmAbi for NetworkType
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[NetworkType]>, ) -> <NetworkType as VectorIntoWasmAbi>::Abi
impl Copy for NetworkType
impl Eq for NetworkType
impl StructuralPartialEq for NetworkType
Auto Trait Implementations§
impl Freeze for NetworkType
impl RefUnwindSafe for NetworkType
impl Send for NetworkType
impl Sync for NetworkType
impl Unpin for NetworkType
impl UnwindSafe for NetworkType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.