pub enum StellarChainReference {
Pubnet,
Testnet,
}Expand description
A Stellar chain reference (pubnet or testnet).
Variants§
Implementations§
Source§impl StellarChainReference
impl StellarChainReference
Sourcepub const fn passphrase(self) -> &'static str
pub const fn passphrase(self) -> &'static str
Returns the Stellar network passphrase.
Sourcepub const fn default_horizon_url(self) -> &'static str
pub const fn default_horizon_url(self) -> &'static str
Returns the default Horizon URL for this network.
Sourcepub const fn default_rpc_url(self) -> Option<&'static str>
pub const fn default_rpc_url(self) -> Option<&'static str>
Returns the default Soroban RPC URL, if one exists.
Pubnet has no public default; the operator must supply an RPC URL.
Sourcepub fn rpc_url(
self,
rpc_url: Option<&str>,
) -> Result<String, StellarRpcUrlError>
pub fn rpc_url( self, rpc_url: Option<&str>, ) -> Result<String, StellarRpcUrlError>
Resolves the RPC URL, requiring an operator URL on pubnet.
§Errors
Returns StellarRpcUrlError::PubnetRpcRequired when rpc_url is
empty on pubnet.
Trait Implementations§
Source§impl Clone for StellarChainReference
impl Clone for StellarChainReference
Source§fn clone(&self) -> StellarChainReference
fn clone(&self) -> StellarChainReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StellarChainReference
Source§impl Debug for StellarChainReference
impl Debug for StellarChainReference
Source§impl<'de> Deserialize<'de> for StellarChainReference
impl<'de> Deserialize<'de> for StellarChainReference
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StellarChainReference
impl Display for StellarChainReference
impl Eq for StellarChainReference
Source§impl From<StellarChainReference> for ChainId
impl From<StellarChainReference> for ChainId
Source§fn from(value: StellarChainReference) -> Self
fn from(value: StellarChainReference) -> Self
Converts to this type from the input type.
Source§impl FromStr for StellarChainReference
impl FromStr for StellarChainReference
Source§impl Hash for StellarChainReference
impl Hash for StellarChainReference
Source§impl PartialEq for StellarChainReference
impl PartialEq for StellarChainReference
Source§impl Serialize for StellarChainReference
impl Serialize for StellarChainReference
impl StructuralPartialEq for StellarChainReference
Auto Trait Implementations§
impl Freeze for StellarChainReference
impl RefUnwindSafe for StellarChainReference
impl Send for StellarChainReference
impl Sync for StellarChainReference
impl Unpin for StellarChainReference
impl UnsafeUnpin for StellarChainReference
impl UnwindSafe for StellarChainReference
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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 moreimpl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more