pub struct MethodInfo {
pub name: String,
pub description: Option<String>,
pub params_schema: Option<Value>,
pub result_schema: Option<Value>,
}
Expand description
Method information for documentation and introspection
Fields§
§name: String
§description: Option<String>
§params_schema: Option<Value>
§result_schema: Option<Value>
Implementations§
Source§impl MethodInfo
impl MethodInfo
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Add method description
Sourcepub fn with_params_schema(self, schema: Value) -> Self
pub fn with_params_schema(self, schema: Value) -> Self
Add parameter schema
Sourcepub fn with_result_schema(self, schema: Value) -> Self
pub fn with_result_schema(self, schema: Value) -> Self
Add result schema
Trait Implementations§
Source§impl Clone for MethodInfo
impl Clone for MethodInfo
Source§fn clone(&self) -> MethodInfo
fn clone(&self) -> MethodInfo
Returns a duplicate 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 MethodInfo
impl RefUnwindSafe for MethodInfo
impl Send for MethodInfo
impl Sync for MethodInfo
impl Unpin for MethodInfo
impl UnwindSafe for MethodInfo
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