pub struct ManifestValueDisplayContext<'a> {
pub address_bech32_encoder: Option<&'a AddressBech32Encoder>,
pub bucket_names: Option<&'a NonIterMap<ManifestBucket, String>>,
pub proof_names: Option<&'a NonIterMap<ManifestProof, String>>,
pub address_reservation_names: Option<&'a NonIterMap<ManifestAddressReservation, String>>,
pub address_names: Option<&'a NonIterMap<ManifestNamedAddress, String>>,
}
Expand description
Note - this is quite similar to ManifestDecompilationDisplayContext
- except this is used with formatting of an encoded payload, rather than a ManifestValue itself
Fields§
§address_bech32_encoder: Option<&'a AddressBech32Encoder>
§bucket_names: Option<&'a NonIterMap<ManifestBucket, String>>
§proof_names: Option<&'a NonIterMap<ManifestProof, String>>
§address_reservation_names: Option<&'a NonIterMap<ManifestAddressReservation, String>>
§address_names: Option<&'a NonIterMap<ManifestNamedAddress, String>>
Implementations§
Source§impl<'a> ManifestValueDisplayContext<'a>
impl<'a> ManifestValueDisplayContext<'a>
pub fn no_context() -> ManifestValueDisplayContext<'a>
pub fn with_optional_bech32( address_bech32_encoder: Option<&'a AddressBech32Encoder>, ) -> ManifestValueDisplayContext<'a>
pub fn with_bech32_and_names( address_bech32_encoder: Option<&'a AddressBech32Encoder>, bucket_names: &'a NonIterMap<ManifestBucket, String>, proof_names: &'a NonIterMap<ManifestProof, String>, address_reservation_names: &'a NonIterMap<ManifestAddressReservation, String>, address_names: &'a NonIterMap<ManifestNamedAddress, String>, ) -> ManifestValueDisplayContext<'a>
pub fn get_bucket_name(&self, bucket_id: &ManifestBucket) -> Option<&str>
pub fn get_proof_name(&self, proof_id: &ManifestProof) -> Option<&str>
pub fn get_address_reservation_name( &self, address_reservation_id: &ManifestAddressReservation, ) -> Option<&str>
pub fn get_address_name( &self, address_id: &ManifestNamedAddress, ) -> Option<&str>
Trait Implementations§
Source§impl<'a> Clone for ManifestValueDisplayContext<'a>
impl<'a> Clone for ManifestValueDisplayContext<'a>
Source§fn clone(&self) -> ManifestValueDisplayContext<'a>
fn clone(&self) -> ManifestValueDisplayContext<'a>
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<'a> CustomDisplayContext<'a> for ManifestValueDisplayContext<'a>
impl<'a> CustomDisplayContext<'a> for ManifestValueDisplayContext<'a>
Source§impl<'a> Debug for ManifestValueDisplayContext<'a>
impl<'a> Debug for ManifestValueDisplayContext<'a>
Source§impl<'a> Default for ManifestValueDisplayContext<'a>
impl<'a> Default for ManifestValueDisplayContext<'a>
Source§fn default() -> ManifestValueDisplayContext<'a>
fn default() -> ManifestValueDisplayContext<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Into<ManifestValueDisplayContext<'a>> for &'a AddressBech32Encoder
impl<'a> Into<ManifestValueDisplayContext<'a>> for &'a AddressBech32Encoder
Source§fn into(self) -> ManifestValueDisplayContext<'a>
fn into(self) -> ManifestValueDisplayContext<'a>
Converts this type into the (usually inferred) input type.
Source§impl<'a> Into<ManifestValueDisplayContext<'a>> for Option<&'a AddressBech32Encoder>
impl<'a> Into<ManifestValueDisplayContext<'a>> for Option<&'a AddressBech32Encoder>
Source§fn into(self) -> ManifestValueDisplayContext<'a>
fn into(self) -> ManifestValueDisplayContext<'a>
Converts this type into the (usually inferred) input type.
impl<'a> Copy for ManifestValueDisplayContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for ManifestValueDisplayContext<'a>
impl<'a> RefUnwindSafe for ManifestValueDisplayContext<'a>
impl<'a> Send for ManifestValueDisplayContext<'a>
impl<'a> Sync for ManifestValueDisplayContext<'a>
impl<'a> Unpin for ManifestValueDisplayContext<'a>
impl<'a> UnwindSafe for ManifestValueDisplayContext<'a>
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, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
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<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