pub struct Method<'a> { /* private fields */ }Expand description
A method definition in Varlink IDL.
Implementations§
Source§impl<'a> Method<'a>
impl<'a> Method<'a>
Sourcepub const fn new(
name: &'a str,
inputs: &'a [&'a Parameter<'a>],
outputs: &'a [&'a Parameter<'a>],
comments: &'a [&'a Comment<'a>],
) -> Self
pub const fn new( name: &'a str, inputs: &'a [&'a Parameter<'a>], outputs: &'a [&'a Parameter<'a>], comments: &'a [&'a Comment<'a>], ) -> Self
Creates a new method with the given name, borrowed parameters, and comments.
Sourcepub fn new_owned(
name: &'a str,
inputs: Vec<Parameter<'a>>,
outputs: Vec<Parameter<'a>>,
comments: Vec<Comment<'a>>,
) -> Self
pub fn new_owned( name: &'a str, inputs: Vec<Parameter<'a>>, outputs: Vec<Parameter<'a>>, comments: Vec<Comment<'a>>, ) -> Self
Creates a new method with the given name, owned parameters, and comments.
Sourcepub fn inputs(&self) -> impl Iterator<Item = &Parameter<'a>>
pub fn inputs(&self) -> impl Iterator<Item = &Parameter<'a>>
Returns an iterator over the input parameters.
Sourcepub fn outputs(&self) -> impl Iterator<Item = &Parameter<'a>>
pub fn outputs(&self) -> impl Iterator<Item = &Parameter<'a>>
Returns an iterator over the output parameters.
Sourcepub fn has_no_inputs(&self) -> bool
pub fn has_no_inputs(&self) -> bool
Returns true if the method has no input parameters.
Sourcepub fn has_no_outputs(&self) -> bool
pub fn has_no_outputs(&self) -> bool
Returns true if the method has no output parameters.
Trait Implementations§
impl<'a> Eq for Method<'a>
Auto Trait Implementations§
impl<'a> Freeze for Method<'a>
impl<'a> RefUnwindSafe for Method<'a>
impl<'a> Send for Method<'a>
impl<'a> Sync for Method<'a>
impl<'a> Unpin for Method<'a>
impl<'a> UnwindSafe for Method<'a>
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