pub struct ModelsJson { /* private fields */ }Expand description
One load of models.json.
Implementations§
Source§impl ModelsJson
impl ModelsJson
Sourcepub fn load(path: Option<&Path>) -> Self
pub fn load(path: Option<&Path>) -> Self
A missing file is empty; read, parse and schema errors become
ModelsJson::error with the load texts.
Sourcepub fn parse_at(content: &str, path: &Path) -> Self
pub fn parse_at(content: &str, path: &Path) -> Self
Parses content as if read from path (used for diagnostics).
Sourcepub fn provider(&self, id: &str) -> Option<&ModelsJsonProvider>
pub fn provider(&self, id: &str) -> Option<&ModelsJsonProvider>
Provider entry by id.
Sourcepub fn provider_ids(&self) -> impl Iterator<Item = &str>
pub fn provider_ids(&self) -> impl Iterator<Item = &str>
Provider ids in file order.
Trait Implementations§
Source§impl Clone for ModelsJson
impl Clone for ModelsJson
Source§impl Debug for ModelsJson
impl Debug for ModelsJson
Source§impl Default for ModelsJson
impl Default for ModelsJson
Source§impl PartialEq for ModelsJson
impl PartialEq for ModelsJson
impl StructuralPartialEq for ModelsJson
Auto Trait Implementations§
impl Freeze for ModelsJson
impl RefUnwindSafe for ModelsJson
impl Send for ModelsJson
impl Sync for ModelsJson
impl Unpin for ModelsJson
impl UnsafeUnpin for ModelsJson
impl UnwindSafe for ModelsJson
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