pub struct MethodSpec {
pub modifiers: Modifiers,
pub name: String,
pub annotations: Vec<AnnotationSpec>,
pub arguments: Vec<ArgumentSpec>,
pub returns: Option<Type>,
pub throws: Vec<ClassType>,
pub elements: Elements,
}
Fields§
§modifiers: Modifiers
§name: String
§annotations: Vec<AnnotationSpec>
§arguments: Vec<ArgumentSpec>
§returns: Option<Type>
§throws: Vec<ClassType>
§elements: Elements
Implementations§
Source§impl MethodSpec
impl MethodSpec
pub fn new(modifiers: Modifiers, name: &str) -> MethodSpec
pub fn push_annotation<A>(&mut self, annotation: A)where
A: Into<AnnotationSpec>,
pub fn push_argument<A>(&mut self, argument: A)where
A: Into<ArgumentSpec>,
pub fn returns<T>(&mut self, returns: T)
pub fn throws<T>(&mut self, throws: T)
pub fn push<E>(&mut self, element: E)
Trait Implementations§
Source§impl Clone for MethodSpec
impl Clone for MethodSpec
Source§fn clone(&self) -> MethodSpec
fn clone(&self) -> MethodSpec
Returns a copy 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 MethodSpec
impl Debug for MethodSpec
Source§impl From<MethodSpec> for Element
impl From<MethodSpec> for Element
Source§fn from(value: MethodSpec) -> Element
fn from(value: MethodSpec) -> Element
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MethodSpec
impl RefUnwindSafe for MethodSpec
impl Send for MethodSpec
impl Sync for MethodSpec
impl Unpin for MethodSpec
impl UnwindSafe for MethodSpec
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