pub struct OperationTable {
pub source: TableSource,
ops: BTreeMap<String, Operation>,
}Fields§
§source: TableSource§ops: BTreeMap<String, Operation>Implementations§
Source§impl OperationTable
impl OperationTable
pub fn from_openapi(doc: &Value, source: TableSource) -> Result<Self, String>
pub fn snapshot() -> Self
fn from_json(v: &Value, source: TableSource) -> Result<Self, String>
pub fn get(&self, id: &str) -> Option<&Operation>
pub fn iter(&self) -> impl Iterator<Item = &Operation>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn nearest(&self, id: &str, n: usize) -> Vec<String>
pub fn nearest(&self, id: &str, n: usize) -> Vec<String>
The n ids closest to id by Levenshtein distance, ties alphabetical.
pub fn to_json(&self) -> Value
Trait Implementations§
Source§impl Clone for OperationTable
impl Clone for OperationTable
Source§fn clone(&self) -> OperationTable
fn clone(&self) -> OperationTable
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 moreAuto Trait Implementations§
impl Freeze for OperationTable
impl RefUnwindSafe for OperationTable
impl Send for OperationTable
impl Sync for OperationTable
impl Unpin for OperationTable
impl UnsafeUnpin for OperationTable
impl UnwindSafe for OperationTable
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