pub struct SpecInterfaceAnchor {
pub interface_name: ContractSpecString,
pub interface_version: ContractSpecString,
pub declared_by: ContractSpecId,
}Fields§
§interface_name: ContractSpecString§interface_version: ContractSpecString§declared_by: ContractSpecIdThe item that declares the anchored interface: the #[contract]
trait’s spec id (CRATE@MAJOR::module::path::Trait), or CRATE@MAJOR
for a bare impl or free-function contract.
The interface key is (name, version) because that is all the wire
carries — interface_id and every entrypoint id hash the bare name
and major version, so that independent crates can implement one
interface. Two unrelated traits can therefore share a key. This field
is spec-only and tells them apart: spec-tool keeps only the fragments
of the declarer an artifact anchors, and rejects an artifact that
anchors two declarers under one key, since nothing on the wire could
tell their interfaces apart.
Trait Implementations§
Source§impl Clone for SpecInterfaceAnchor
impl Clone for SpecInterfaceAnchor
Source§impl ConstMaxSize for SpecInterfaceAnchor
impl ConstMaxSize for SpecInterfaceAnchor
Source§impl ConstMaxSize for SpecInterfaceAnchor
impl ConstMaxSize for SpecInterfaceAnchor
Source§impl Debug for SpecInterfaceAnchor
impl Debug for SpecInterfaceAnchor
impl EncodesAs<SpecInterfaceAnchor> for SpecInterfaceAnchor
impl Eq for SpecInterfaceAnchor
Source§impl From<SpecInterfaceAnchorView<'_>> for SpecInterfaceAnchor
Available on crate feature owned-model only.
impl From<SpecInterfaceAnchorView<'_>> for SpecInterfaceAnchor
Available on crate feature
owned-model only.Source§fn from(value: SpecInterfaceAnchorView<'_>) -> Self
fn from(value: SpecInterfaceAnchorView<'_>) -> Self
Converts to this type from the input type.
Source§impl Hash for SpecInterfaceAnchor
impl Hash for SpecInterfaceAnchor
Source§impl Ord for SpecInterfaceAnchor
impl Ord for SpecInterfaceAnchor
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 SpecInterfaceAnchor
impl PartialEq for SpecInterfaceAnchor
Source§impl PartialOrd for SpecInterfaceAnchor
impl PartialOrd for SpecInterfaceAnchor
Source§impl<'_r> ReadXDR<'_r> for SpecInterfaceAnchor
impl<'_r> ReadXDR<'_r> for SpecInterfaceAnchor
Source§fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
Reads an XDR value from the reader. Read more
Source§fn read_xdr_in_place<'__xdrs_s, R: Reader<'_r>>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, Self>,
) -> ReadResult<Init<'__xdrs_s, Self>>
fn read_xdr_in_place<'__xdrs_s, R: Reader<'_r>>( r: &mut R, __xdrs_slot: Slot<'__xdrs_s, Self>, ) -> ReadResult<Init<'__xdrs_s, Self>>
Reads an XDR value directly into
slot, without first building it
on the stack. Read moreimpl StructuralPartialEq for SpecInterfaceAnchor
Source§impl WriteXDR for SpecInterfaceAnchor
impl WriteXDR for SpecInterfaceAnchor
Source§fn write_xdr<F, W: Writer<F>>(&self, w: &mut W) -> WriteResult<()>
fn write_xdr<F, W: Writer<F>>(&self, w: &mut W) -> WriteResult<()>
Writes this value as XDR data to the writer. Read more
Source§unsafe fn write_xdr_unchecked<F, W: WriterUnchecked<F>>(&self, w: &mut W)
unsafe fn write_xdr_unchecked<F, W: WriterUnchecked<F>>(&self, w: &mut W)
Writes this value as XDR data to the writer, without runtime checks. Read more
Auto Trait Implementations§
impl Freeze for SpecInterfaceAnchor
impl RefUnwindSafe for SpecInterfaceAnchor
impl Send for SpecInterfaceAnchor
impl Sync for SpecInterfaceAnchor
impl Unpin for SpecInterfaceAnchor
impl UnsafeUnpin for SpecInterfaceAnchor
impl UnwindSafe for SpecInterfaceAnchor
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