pub trait MethodArgAccess<'de, 's> {
type Error: Error;
type ContentDeserializer: Deserializer<'de, Error = Self::Error>;
// Required methods
fn src(&self) -> Option<&'s str>;
fn dst(&self) -> Option<impl Iterator<Item = &'s str>>;
fn pos(&self) -> Option<usize>;
fn lv_index(&self) -> Option<usize>;
fn content(self) -> Self::ContentDeserializer;
}Expand description
Method argument name, pos, slot and comment accessor.
Required Associated Types§
Sourcetype ContentDeserializer: Deserializer<'de, Error = Self::Error>
type ContentDeserializer: Deserializer<'de, Error = Self::Error>
Type of deserializer of the element’s contents.
Required Methods§
Sourcefn pos(&self) -> Option<usize>
fn pos(&self) -> Option<usize>
The position of this argument starts from zero, and increase by one.
Sourcefn lv_index(&self) -> Option<usize>
fn lv_index(&self) -> Option<usize>
The local variable index of this parameter in the current method.
Starts at zero for static methods and one otherwise, increase by 1, or by 2 if it’s a double-wide primitive.
Also known as slot.
Sourcefn content(self) -> Self::ContentDeserializer
fn content(self) -> Self::ContentDeserializer
Returns the content deserializer for further deserialization of this method.
It may only contain comments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".