pub struct WitMethod {
pub name: String,
pub params: Vec<(String, String)>,
pub ret: Option<String>,
pub stream_item: Option<String>,
}Expand description
One method projected to WIT (already-mapped strings).
Fields§
§name: Stringkebab-case export name.
params: Vec<(String, String)>(param-name, wit-type) pairs, in order.
ret: Option<String>WIT return type, or None for no return.
stream_item: Option<String>For a server-streaming method (-> fidius::Stream<T>): the WIT item
type T (FIDIUS-I-0026). When Some, the method renders as an exported
resource <name>-stream { next: func() -> result<option<T>, plugin-error>; }
and the func returns that resource (-> <name>-stream). None for a
normal func.
Auto Trait Implementations§
impl Freeze for WitMethod
impl RefUnwindSafe for WitMethod
impl Send for WitMethod
impl Sync for WitMethod
impl Unpin for WitMethod
impl UnsafeUnpin for WitMethod
impl UnwindSafe for WitMethod
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