pub struct FunctionSpec { /* private fields */ }Expand description
Builder for a single Function, used inside
ExtensionSpec::function.
Implementations§
Source§impl FunctionSpec
impl FunctionSpec
Sourcepub fn param(self, name: impl Into<String>, ty: Type) -> Self
pub fn param(self, name: impl Into<String>, ty: Type) -> Self
Appends a typed parameter. The name must be a valid ASCII identifier
(validated at Build::generate time).
Sourcepub fn async(self) -> Self
pub fn async(self) -> Self
Marks the function asynchronous. Async functions must also declare
returns(Type::String); validation fails otherwise. See
Function::r#async for the runtime
token protocol.
Trait Implementations§
Source§impl Clone for FunctionSpec
impl Clone for FunctionSpec
Source§fn clone(&self) -> FunctionSpec
fn clone(&self) -> FunctionSpec
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionSpec
impl RefUnwindSafe for FunctionSpec
impl Send for FunctionSpec
impl Sync for FunctionSpec
impl Unpin for FunctionSpec
impl UnwindSafe for FunctionSpec
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