pub struct LedgerId(/* private fields */);
Expand description
The ID of a Hedera Ledger.
Implementations§
source§impl LedgerId
impl LedgerId
sourcepub fn previewnet() -> Self
pub fn previewnet() -> Self
ID for the previewnet
ledger.
sourcepub fn from_bytes(bytes: Vec<u8>) -> Self
pub fn from_bytes(bytes: Vec<u8>) -> Self
Create a ledger ID from the given bytes.
sourcepub fn is_mainnet(&self) -> bool
pub fn is_mainnet(&self) -> bool
Returns true
if self
is mainnet
.
sourcepub fn is_testnet(&self) -> bool
pub fn is_testnet(&self) -> bool
Returns true
if self
is testnet
.
sourcepub fn is_previewnet(&self) -> bool
pub fn is_previewnet(&self) -> bool
Returns true
if self
is previewnet
.
sourcepub fn is_known_network(&self) -> bool
pub fn is_known_network(&self) -> bool
Returns true
if self
is mainnet
, testnet
, or previewnet
.
Trait Implementations§
source§impl PartialEq for LedgerId
impl PartialEq for LedgerId
impl Eq for LedgerId
impl StructuralPartialEq for LedgerId
Auto Trait Implementations§
impl Freeze for LedgerId
impl RefUnwindSafe for LedgerId
impl Send for LedgerId
impl Sync for LedgerId
impl Unpin for LedgerId
impl UnwindSafe for LedgerId
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<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<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<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request