#[non_exhaustive]pub struct ModelGardenSource {
pub public_model_name: String,
pub version_id: String,
pub skip_hf_model_cache: bool,
/* private fields */
}Available on crate features
dataset-service or model-service or pipeline-service only.Expand description
Contains information about the source of the models generated from Model Garden.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.public_model_name: StringRequired. The model garden source model resource name.
version_id: StringOptional. The model garden source model version ID.
skip_hf_model_cache: boolOptional. Whether to avoid pulling the model from the HF cache.
Implementations§
Source§impl ModelGardenSource
impl ModelGardenSource
pub fn new() -> Self
Sourcepub fn set_public_model_name<T: Into<String>>(self, v: T) -> Self
pub fn set_public_model_name<T: Into<String>>(self, v: T) -> Self
Sets the value of public_model_name.
§Example
ⓘ
let x = ModelGardenSource::new().set_public_model_name("example");Sourcepub fn set_version_id<T: Into<String>>(self, v: T) -> Self
pub fn set_version_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_skip_hf_model_cache<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_hf_model_cache<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_hf_model_cache.
§Example
ⓘ
let x = ModelGardenSource::new().set_skip_hf_model_cache(true);Trait Implementations§
Source§impl Clone for ModelGardenSource
impl Clone for ModelGardenSource
Source§fn clone(&self) -> ModelGardenSource
fn clone(&self) -> ModelGardenSource
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 moreSource§impl Debug for ModelGardenSource
impl Debug for ModelGardenSource
Source§impl Default for ModelGardenSource
impl Default for ModelGardenSource
Source§fn default() -> ModelGardenSource
fn default() -> ModelGardenSource
Returns the “default value” for a type. Read more
Source§impl Message for ModelGardenSource
impl Message for ModelGardenSource
Source§impl PartialEq for ModelGardenSource
impl PartialEq for ModelGardenSource
impl StructuralPartialEq for ModelGardenSource
Auto Trait Implementations§
impl Freeze for ModelGardenSource
impl RefUnwindSafe for ModelGardenSource
impl Send for ModelGardenSource
impl Sync for ModelGardenSource
impl Unpin for ModelGardenSource
impl UnwindSafe for ModelGardenSource
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