pub struct ApiInterface {
pub name: String,
pub doc: Option<String>,
pub direction: Direction,
pub capability: Capability,
pub functions: Vec<ApiFunction>,
pub types: Vec<ApiType>,
pub uses: Vec<ApiUse>,
}Expand description
One WIT interface — a namespace of functions a plugin implements or calls.
Fields§
§name: StringKebab-case interface name, e.g. host-services.
doc: Option<String>The interface’s /// doc comment, if any.
direction: DirectionWorld-derived direction relative to a guest plugin.
capability: CapabilityHost-authored capability requirement (the WIT can’t carry it).
functions: Vec<ApiFunction>The interface’s functions, sorted by name.
types: Vec<ApiType>The types this interface DEFINES, in WIT source order (authors order a seam’s types so each is read after what it depends on).
uses: Vec<ApiUse>The types this interface pulls in from another with use, in source
order. Listed apart from types so a reference links to
the definition instead of repeating it.
Trait Implementations§
Source§impl Clone for ApiInterface
impl Clone for ApiInterface
Source§fn clone(&self) -> ApiInterface
fn clone(&self) -> ApiInterface
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApiInterface
impl Debug for ApiInterface
impl Eq for ApiInterface
Source§impl PartialEq for ApiInterface
impl PartialEq for ApiInterface
impl StructuralPartialEq for ApiInterface
Auto Trait Implementations§
impl Freeze for ApiInterface
impl RefUnwindSafe for ApiInterface
impl Send for ApiInterface
impl Sync for ApiInterface
impl Unpin for ApiInterface
impl UnsafeUnpin for ApiInterface
impl UnwindSafe for ApiInterface
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