pub struct ContractAddress { /* private fields */ }Expand description
Represents a 256-bit contract address.
In the Thruput storage model, each contract is deployed at a
32-byte unique ContractAddress.
Implementations§
Source§impl ContractAddress
impl ContractAddress
pub fn into_inner(self) -> [u8; 32]
pub const fn new(_inner: [u8; 32]) -> ContractAddress
Source§impl ContractAddress
impl ContractAddress
Sourcepub const fn zero() -> ContractAddress
pub const fn zero() -> ContractAddress
Returns the all-zero address, useful as a placeholder where no real contract address exists yet.
Trait Implementations§
Source§impl AsRef<[u8]> for ContractAddress
impl AsRef<[u8]> for ContractAddress
Source§impl Clone for ContractAddress
impl Clone for ContractAddress
Source§fn clone(&self) -> ContractAddress
fn clone(&self) -> ContractAddress
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 moreSource§impl CollectAuthHandles for ContractAddress
impl CollectAuthHandles for ContractAddress
fn collect_auth_handles( &self, _out: &mut AuthHandleBuf, ) -> Result<(), FaultString>
Source§impl ConstMaxSize for ContractAddress
impl ConstMaxSize for ContractAddress
Source§impl ConstMaxSize for ContractAddress
impl ConstMaxSize for ContractAddress
Source§impl ContractTypeRefSpec for ContractAddress
impl ContractTypeRefSpec for ContractAddress
Source§const INFO: ContractTypeInfo<'static>
const INFO: ContractTypeInfo<'static>
The type reference. Transitive type definitions are not carried here;
they are retained via the linker-anchor mechanism
(
__THRUPUT_SPEC_ANCHOR_ROOT) and resolved by spec-tool.Source§const SIGNED_PREIMAGE: Option<&'static ContractTypeView<'static>> = _
const SIGNED_PREIMAGE: Option<&'static ContractTypeView<'static>> = _
How this type appears as a signed-token preimage
(
ContractTypeView::SignedToken’s payload): the type itself by
default, or None for a type-erased payload (the SDK’s Opaque
overrides this).impl Copy for ContractAddress
Source§impl Debug for ContractAddress
impl Debug for ContractAddress
Source§impl Default for ContractAddress
impl Default for ContractAddress
Source§fn default() -> ContractAddress
fn default() -> ContractAddress
Returns the “default value” for a type. Read more
Source§impl Deref for ContractAddress
impl Deref for ContractAddress
Source§impl DerefMut for ContractAddress
impl DerefMut for ContractAddress
impl EncodesAs<ContractAddress> for ContractAddress
impl Eq for ContractAddress
Source§impl From<ContractAddress> for StorageKeyContractData
impl From<ContractAddress> for StorageKeyContractData
Source§fn from(addr: ContractAddress) -> StorageKeyContractData
fn from(addr: ContractAddress) -> StorageKeyContractData
Converts to this type from the input type.
Source§impl From<SHA256Hash> for ContractAddress
impl From<SHA256Hash> for ContractAddress
Source§fn from(hash: SHA256Hash) -> ContractAddress
fn from(hash: SHA256Hash) -> ContractAddress
Converts to this type from the input type.
Source§impl Hash for ContractAddress
impl Hash for ContractAddress
Source§impl IntoTopic for ContractAddress
impl IntoTopic for ContractAddress
fn into_topic(&self) -> TopicSrc<'_>
Source§impl JsonSchema for ContractAddress
Available on crate feature schema only.
impl JsonSchema for ContractAddress
Available on crate feature
schema only.Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Mintable for ContractAddress
impl Mintable for ContractAddress
fn mint_into_parent( preimage: ContractAddress, _children: &mut ChildNodeBuf, ) -> Self
Source§impl MintableType for ContractAddress
impl MintableType for ContractAddress
type Preimage = ContractAddress
Source§impl Named for ContractAddress
impl Named for ContractAddress
Source§fn named(name: &str) -> ContractAddress
fn named(name: &str) -> ContractAddress
The deterministic address derived from
name.Source§impl Ord for ContractAddress
impl Ord for ContractAddress
Source§fn cmp(&self, other: &ContractAddress) -> Ordering
fn cmp(&self, other: &ContractAddress) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ContractAddress
impl PartialEq for ContractAddress
Source§impl PartialOrd for ContractAddress
impl PartialOrd for ContractAddress
Source§impl<'_r> ReadXDR<'_r> for ContractAddress
impl<'_r> ReadXDR<'_r> for ContractAddress
Source§fn read_xdr<R>(r: &mut R) -> Result<ContractAddress, ReadError>where
R: Reader<'_r>,
fn read_xdr<R>(r: &mut R) -> Result<ContractAddress, ReadError>where
R: Reader<'_r>,
Reads an XDR value from the reader. Read more
Source§fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, ContractAddress>,
) -> Result<Init<'__xdrs_s, ContractAddress>, ReadError>where
R: Reader<'_r>,
fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, ContractAddress>,
) -> Result<Init<'__xdrs_s, ContractAddress>, ReadError>where
R: Reader<'_r>,
Reads an XDR value directly into
slot, without first building it
on the stack. Read moreSource§impl<'r, 'a> ReadXDR<'r> for &'a ContractAddresswhere
'r: 'a,
Available on crate feature xdrs only.
impl<'r, 'a> ReadXDR<'r> for &'a ContractAddresswhere
'r: 'a,
Available on crate feature
xdrs only.Source§impl ReceiveAuthHandles for ContractAddress
impl ReceiveAuthHandles for ContractAddress
fn receive_auth_handles( &mut self, _handles: &mut impl Iterator<Item = u32>, ) -> Result<(), AuthTokenError>
impl StructuralPartialEq for ContractAddress
Source§impl WriteXDR for ContractAddress
impl WriteXDR for ContractAddress
Source§fn write_xdr<F, W>(&self, w: &mut W) -> Result<(), WriteError>where
W: Writer<F>,
fn write_xdr<F, W>(&self, w: &mut W) -> Result<(), WriteError>where
W: Writer<F>,
Writes this value as XDR data to the writer. Read more
Source§unsafe fn write_xdr_unchecked<F, W>(&self, w: &mut W)where
W: WriterUnchecked<F>,
unsafe fn write_xdr_unchecked<F, W>(&self, w: &mut W)where
W: WriterUnchecked<F>,
Writes this value as XDR data to the writer, without runtime checks. Read more
Auto Trait Implementations§
impl Freeze for ContractAddress
impl RefUnwindSafe for ContractAddress
impl Send for ContractAddress
impl Sync for ContractAddress
impl Unpin for ContractAddress
impl UnsafeUnpin for ContractAddress
impl UnwindSafe for ContractAddress
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