pub struct Interface { /* private fields */ }
Implementations§
Source§impl Interface
impl Interface
pub fn name(&self) -> &Ident
pub fn set_name(&mut self, name: impl Into<Ident>)
Sourcepub fn function(&mut self, function: StandaloneFunc)
pub fn function(&mut self, function: StandaloneFunc)
Add an Function
to the interface
pub fn uses(&self) -> &[Use]
pub fn uses_mut(&mut self) -> &mut [Use]
Sourcepub fn use_type(
&mut self,
target: impl Into<Ident>,
item: impl Into<Ident>,
rename: Option<Ident>,
)
pub fn use_type( &mut self, target: impl Into<Ident>, item: impl Into<Ident>, rename: Option<Ident>, )
Use a type in the interface.
pub fn item(&mut self, item: impl Into<InterfaceItem>)
pub fn items(&self) -> &[InterfaceItem]
pub fn items_mut(&mut self) -> &mut Vec<InterfaceItem>
Sourcepub fn set_docs(&mut self, docs: Option<impl Into<Docs>>)
pub fn set_docs(&mut self, docs: Option<impl Into<Docs>>)
Set the documentation of this interface.
pub fn docs(&self) -> &Option<Docs>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interface
impl<'de> Deserialize<'de> for Interface
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Interface
impl Ord for Interface
Source§impl PartialOrd for Interface
impl PartialOrd for Interface
impl Eq for Interface
impl StructuralPartialEq for Interface
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.