pub struct SpecMethodFragment {
pub interface_name: ContractSpecString,
pub interface_version: ContractSpecString,
pub declared_by: ContractSpecId,
pub method: ContractSpecMethod,
}Expand description
A method belonging to interface_name@interface_version.
Emitted only by a site that also anchors that interface — a #[contract]
impl, or export_interface_spec! in a carrier. A #[contract] trait
definition emits its SpecInterfaceFragment as a candidate but no
methods: two unrelated traits can collide on one interface key (default
name = trait ident, default version = crate version), and candidate
methods from a trait nothing implements would otherwise publish as
phantom methods of the contract that merely links them. (declared_by
now separates such traits in spec-tool as well.)
Fields§
§interface_name: ContractSpecString§interface_version: ContractSpecString§declared_by: ContractSpecIdThe item that declares this interface: the #[contract] trait’s spec
id (CRATE@MAJOR::module::path::Trait), or CRATE@MAJOR for a bare
impl or free-function contract. See SpecInterfaceAnchor::declared_by.
method: ContractSpecMethodTrait Implementations§
Source§impl Clone for SpecMethodFragment
impl Clone for SpecMethodFragment
Source§impl ConstMaxSize for SpecMethodFragment
impl ConstMaxSize for SpecMethodFragment
Source§impl ConstMaxSize for SpecMethodFragment
impl ConstMaxSize for SpecMethodFragment
Source§impl Debug for SpecMethodFragment
impl Debug for SpecMethodFragment
impl EncodesAs<SpecMethodFragment> for SpecMethodFragment
impl Eq for SpecMethodFragment
Source§impl From<SpecMethodFragmentView<'_>> for SpecMethodFragment
Available on crate feature owned-model only.
impl From<SpecMethodFragmentView<'_>> for SpecMethodFragment
owned-model only.Source§fn from(value: SpecMethodFragmentView<'_>) -> Self
fn from(value: SpecMethodFragmentView<'_>) -> Self
Source§impl Hash for SpecMethodFragment
impl Hash for SpecMethodFragment
Source§impl Ord for SpecMethodFragment
impl Ord for SpecMethodFragment
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SpecMethodFragment
impl PartialEq for SpecMethodFragment
Source§impl PartialOrd for SpecMethodFragment
impl PartialOrd for SpecMethodFragment
Source§impl<'_r> ReadXDR<'_r> for SpecMethodFragment
impl<'_r> ReadXDR<'_r> for SpecMethodFragment
Source§fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
fn read_xdr<R: Reader<'_r>>(r: &mut R) -> ReadResult<Self>
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>>
slot, without first building it
on the stack. Read more