pub struct InterfaceMethodReq {
pub name: String,
pub receiver: ReceiverMode,
pub param_types: Vec<IfaceTy>,
pub return_type: IfaceTy,
pub is_unchecked: bool,
}Expand description
A single required method signature inside an InterfaceDef.
Per ADR-0060, parameter and return slots are IfaceTy so that Self can
be substituted with the candidate at conformance check time.
Fields§
§name: StringMethod name.
receiver: ReceiverModeReceiver mode (self, inout self, or borrow self).
param_types: Vec<IfaceTy>Resolved parameter slots in declaration order (excluding the receiver).
return_type: IfaceTyResolved return slot.
is_unchecked: boolADR-0088: whether this signature is @mark(unchecked). Conformance
requires the implementor’s method is_unchecked to match this
field exactly. Call sites that resolve through the interface
signature (comptime-T monomorphisation via comptime T: I after
specialization, or fat-pointer dispatch via Ref(I) / MutRef(I))
read this flag to decide whether a checked { } block is required.
Trait Implementations§
Source§impl Clone for InterfaceMethodReq
impl Clone for InterfaceMethodReq
Source§fn clone(&self) -> InterfaceMethodReq
fn clone(&self) -> InterfaceMethodReq
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 Debug for InterfaceMethodReq
impl Debug for InterfaceMethodReq
Source§impl<'de> Deserialize<'de> for InterfaceMethodReq
impl<'de> Deserialize<'de> for InterfaceMethodReq
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InterfaceMethodReq
impl RefUnwindSafe for InterfaceMethodReq
impl Send for InterfaceMethodReq
impl Sync for InterfaceMethodReq
impl Unpin for InterfaceMethodReq
impl UnsafeUnpin for InterfaceMethodReq
impl UnwindSafe for InterfaceMethodReq
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].