Skip to main content

Operation

Struct Operation 

Source
pub struct Operation {
    pub identifier: Identifier,
    pub parameters: Vec<WeakPtr<Parameter>>,
    pub return_type: Vec<WeakPtr<Parameter>>,
    pub is_idempotent: bool,
    pub parent: WeakPtr<Interface>,
    pub scope: Scope,
    pub attributes: Vec<WeakPtr<Attribute>>,
    pub comment: Option<DocComment>,
    pub span: Span,
}

Fields§

§identifier: Identifier§parameters: Vec<WeakPtr<Parameter>>§return_type: Vec<WeakPtr<Parameter>>§is_idempotent: bool§parent: WeakPtr<Interface>§scope: Scope§attributes: Vec<WeakPtr<Attribute>>§comment: Option<DocComment>§span: Span

Implementations§

Source§

impl Operation

Source

pub fn parameters(&self) -> Vec<&Parameter>

Source

pub fn return_members(&self) -> Vec<&Parameter>

Source§

impl Operation

Source

pub fn visit_with(&self, visitor: &mut impl Visitor)

Visits the Operation with the provided visitor.

This function first calls visitor.visit_operation, then recursively visits the contents of the operation.

Trait Implementations§

Source§

impl AsAttributables for Operation

Source§

impl AsEntities for Operation

Source§

impl Attributable for Operation

Source§

fn attributes(&self) -> Vec<&Attribute>

Returns the attributes of the element.
Source§

fn all_attributes(&self) -> Vec<&Attribute>

Returns all the attributes of the element and its parents.
Source§

impl Commentable for Operation

Source§

impl Contained<Interface> for Operation

Source§

impl Contained<Operation> for Parameter

Source§

impl Container<Operation> for Interface

Source§

impl Debug for Operation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Element for Operation

Source§

fn kind(&self) -> &'static str

Source§

impl NamedSymbol for Operation

Source§

impl ScopedSymbol for Operation

Source§

impl Symbol for Operation

Source§

fn span(&self) -> &Span

Source§

impl<'a> TryFrom<&'a Node> for &'a Operation

Source§

fn try_from(node: &'a Node) -> Result<&'a Operation, Self::Error>

Attempts to unwrap a node to the specified concrete type.

If the Slice element held by the node is the specified type, this succeeds, and returns the unwrapped element in the requested container. Otherwise this method fails and returns an error message.

Source§

type Error = LookupError

The type returned in the event of a conversion error.
Source§

impl Entity for Operation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<A> AttributeFunctions for A
where A: Attributable + ?Sized,

Source§

fn has_attribute<T>(&self) -> bool
where T: AttributeKind + 'static,

Returns true if this element has an attribute of the specified type and false otherwise.
Source§

fn find_attribute<T>(&self) -> Option<&T>
where T: AttributeKind + 'static,

Returns the first attribute of the specified type that is applied to this element. If no attributes of the specified type can be found, this returns None.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.