pub enum NetworkName {
Mainnet,
Preprod,
Preview,
Testnet(u32),
}Variants§
Implementations§
Source§impl NetworkName
impl NetworkName
pub fn to_network_magic(self) -> NetworkMagic
Sourcepub fn default_epoch_size_in_slots(&self) -> u64
pub fn default_epoch_size_in_slots(&self) -> u64
Compute the default epoch length for this network.
This is an over-simplification as theoretically each era can have a different epoch length but in practice, except for Byron era, all eras for each network have always had the same length
Sourcepub fn default_stability_window(&self) -> Slot
pub fn default_stability_window(&self) -> Slot
Provide stability window for given network.
Trait Implementations§
Source§impl Clone for NetworkName
impl Clone for NetworkName
Source§fn clone(&self) -> NetworkName
fn clone(&self) -> NetworkName
Returns a duplicate of the value. Read more
1.0.0 · 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 NetworkName
impl Debug for NetworkName
Source§impl Display for NetworkName
impl Display for NetworkName
Source§impl From<NetworkName> for &EraHistory
impl From<NetworkName> for &EraHistory
Source§fn from(value: NetworkName) -> Self
fn from(value: NetworkName) -> Self
Converts to this type from the input type.
Source§impl From<NetworkName> for &GlobalParameters
impl From<NetworkName> for &GlobalParameters
Source§fn from(value: NetworkName) -> Self
fn from(value: NetworkName) -> Self
Converts to this type from the input type.
Source§impl From<NetworkName> for Network
impl From<NetworkName> for Network
Source§fn from(value: NetworkName) -> Self
fn from(value: NetworkName) -> Self
Converts to this type from the input type.
Source§impl FromStr for NetworkName
impl FromStr for NetworkName
Source§impl PartialEq for NetworkName
impl PartialEq for NetworkName
Source§impl TryFrom<NetworkName> for &ProtocolParameters
impl TryFrom<NetworkName> for &ProtocolParameters
impl Copy for NetworkName
impl StructuralPartialEq for NetworkName
Auto Trait Implementations§
impl Freeze for NetworkName
impl RefUnwindSafe for NetworkName
impl Send for NetworkName
impl Sync for NetworkName
impl Unpin for NetworkName
impl UnsafeUnpin for NetworkName
impl UnwindSafe for NetworkName
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<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 more