pub struct Interface<'a> { /* private fields */ }Expand description
A Varlink interface definition.
Implementations§
Source§impl<'a> Interface<'a>
impl<'a> Interface<'a>
Sourcepub const fn new(
name: &'a str,
methods: &'a [&'a Method<'a>],
custom_types: &'a [&'a CustomType<'a>],
errors: &'a [&'a Error<'a>],
comments: &'a [&'a Comment<'a>],
) -> Self
pub const fn new( name: &'a str, methods: &'a [&'a Method<'a>], custom_types: &'a [&'a CustomType<'a>], errors: &'a [&'a Error<'a>], comments: &'a [&'a Comment<'a>], ) -> Self
Creates a new interface with the given name, borrowed collections, and comments.
Sourcepub fn new_owned(
name: &'a str,
methods: Vec<Method<'a>>,
custom_types: Vec<CustomType<'a>>,
errors: Vec<Error<'a>>,
comments: Vec<Comment<'a>>,
) -> Self
pub fn new_owned( name: &'a str, methods: Vec<Method<'a>>, custom_types: Vec<CustomType<'a>>, errors: Vec<Error<'a>>, comments: Vec<Comment<'a>>, ) -> Self
Creates a new interface with the given name, owned collections, and comments.
Sourcepub fn methods(&self) -> impl Iterator<Item = &Method<'a>>
pub fn methods(&self) -> impl Iterator<Item = &Method<'a>>
Returns an iterator over the methods of the interface.
Sourcepub fn custom_types(&self) -> impl Iterator<Item = &CustomType<'a>>
pub fn custom_types(&self) -> impl Iterator<Item = &CustomType<'a>>
Returns an iterator over the custom types of the interface.
Sourcepub fn errors(&self) -> impl Iterator<Item = &Error<'a>>
pub fn errors(&self) -> impl Iterator<Item = &Error<'a>>
Returns an iterator over the errors of the interface.
Trait Implementations§
Source§impl<'a> From<&Interface<'a>> for InterfaceDescription<'a>
impl<'a> From<&Interface<'a>> for InterfaceDescription<'a>
impl<'a> Eq for Interface<'a>
Auto Trait Implementations§
impl<'a> Freeze for Interface<'a>
impl<'a> RefUnwindSafe for Interface<'a>
impl<'a> Send for Interface<'a>
impl<'a> Sync for Interface<'a>
impl<'a> Unpin for Interface<'a>
impl<'a> UnwindSafe for Interface<'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