pub struct InputSchema {
pub required: u64,
pub fields: Vec<FieldDef>,
}Expand description
Input parameter schema
Fields§
§required: u64Required fields bitmask (bit N = field N is required)
fields: Vec<FieldDef>Field definitions
Implementations§
Source§impl InputSchema
impl InputSchema
Sourcepub fn set_required(&mut self, field_index: usize) -> &mut Self
pub fn set_required(&mut self, field_index: usize) -> &mut Self
Mark a field as required by index
Sourcepub fn is_required(&self, field_index: usize) -> bool
pub fn is_required(&self, field_index: usize) -> bool
Check if a field is required
Sourcepub fn required_count(&self) -> u32
pub fn required_count(&self) -> u32
Get the number of required fields
Trait Implementations§
Source§impl Clone for InputSchema
impl Clone for InputSchema
Source§fn clone(&self) -> InputSchema
fn clone(&self) -> InputSchema
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 InputSchema
impl Debug for InputSchema
Auto Trait Implementations§
impl Freeze for InputSchema
impl RefUnwindSafe for InputSchema
impl Send for InputSchema
impl Sync for InputSchema
impl Unpin for InputSchema
impl UnsafeUnpin for InputSchema
impl UnwindSafe for InputSchema
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