pub struct NetworkInfo(/* private fields */);Implementations§
Source§impl NetworkInfo
impl NetworkInfo
pub fn new(network_id: u8, protocol_magic: &ProtocolMagic) -> Self
pub fn network_id(&self) -> u8
pub fn protocol_magic(&self) -> ProtocolMagic
Sourcepub fn testnet() -> Self
pub fn testnet() -> Self
This is the old testnet - most likely you want to use preview()/preprod()
pub fn mainnet() -> Self
pub fn preview() -> Self
pub fn preprod() -> Self
pub fn sancho_testnet() -> Self
Trait Implementations§
Source§impl AsRef<NetworkInfo> for NetworkInfo
impl AsRef<NetworkInfo> for NetworkInfo
Source§fn as_ref(&self) -> &NetworkInfo
fn as_ref(&self) -> &NetworkInfo
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl From<NetworkInfo> for JsValue
impl From<NetworkInfo> for JsValue
Source§fn from(value: NetworkInfo) -> Self
fn from(value: NetworkInfo) -> Self
Converts to this type from the input type.
Source§impl From<NetworkInfo> for NetworkInfo
impl From<NetworkInfo> for NetworkInfo
Source§fn from(native: NetworkInfo) -> Self
fn from(native: NetworkInfo) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for NetworkInfo
impl FromWasmAbi for NetworkInfo
Source§impl Into<NetworkInfo> for NetworkInfo
impl Into<NetworkInfo> for NetworkInfo
Source§fn into(self) -> NetworkInfo
fn into(self) -> NetworkInfo
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for NetworkInfo
impl IntoWasmAbi for NetworkInfo
Source§impl LongRefFromWasmAbi for NetworkInfo
impl LongRefFromWasmAbi for NetworkInfo
Source§impl OptionFromWasmAbi for NetworkInfo
impl OptionFromWasmAbi for NetworkInfo
Source§impl OptionIntoWasmAbi for NetworkInfo
impl OptionIntoWasmAbi for NetworkInfo
Source§impl RefFromWasmAbi for NetworkInfo
impl RefFromWasmAbi for NetworkInfo
Source§type Anchor = RcRef<NetworkInfo>
type Anchor = RcRef<NetworkInfo>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for NetworkInfo
impl RefMutFromWasmAbi for NetworkInfo
Source§impl TryFromJsValue for NetworkInfo
impl TryFromJsValue for NetworkInfo
Source§impl VectorFromWasmAbi for NetworkInfo
impl VectorFromWasmAbi for NetworkInfo
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[NetworkInfo]>
Source§impl VectorIntoJsValue for NetworkInfo
impl VectorIntoJsValue for NetworkInfo
fn vector_into_jsvalue(vector: Box<[NetworkInfo]>) -> JsValue
Source§impl VectorIntoWasmAbi for NetworkInfo
impl VectorIntoWasmAbi for NetworkInfo
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[NetworkInfo]>) -> Self::Abi
Source§impl WasmDescribeVector for NetworkInfo
impl WasmDescribeVector for NetworkInfo
impl SupportsConstructor for NetworkInfo
impl SupportsInstanceProperty for NetworkInfo
impl SupportsStaticProperty for NetworkInfo
Auto Trait Implementations§
impl Freeze for NetworkInfo
impl RefUnwindSafe for NetworkInfo
impl Send for NetworkInfo
impl Sync for NetworkInfo
impl Unpin for NetworkInfo
impl UnwindSafe for NetworkInfo
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> 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> 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.