Struct fj::models::ModelMetadata
source · [−]pub struct ModelMetadata {
pub name: String,
pub description: Option<String>,
pub arguments: Vec<ArgumentMetadata>,
}Expand description
Metadata about a crate::models::Model.
Fields
name: StringA short, human-friendly name used to identify this model.
description: Option<String>A description of what this model does.
arguments: Vec<ArgumentMetadata>Arguments that the model uses when calculating its geometry.
Implementations
sourceimpl ModelMetadata
impl ModelMetadata
sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set the ModelMetadata::description.
sourcepub fn with_argument(self, arg: impl Into<ArgumentMetadata>) -> Self
pub fn with_argument(self, arg: impl Into<ArgumentMetadata>) -> Self
Add an argument to the ModelMetadata::arguments list.
As a convenience, string literals can be automatically converted into
ArgumentMetadata with no description or default value.
Trait Implementations
sourceimpl Clone for ModelMetadata
impl Clone for ModelMetadata
sourcefn clone(&self) -> ModelMetadata
fn clone(&self) -> ModelMetadata
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ModelMetadata
impl Debug for ModelMetadata
sourceimpl PartialEq<ModelMetadata> for ModelMetadata
impl PartialEq<ModelMetadata> for ModelMetadata
sourcefn eq(&self, other: &ModelMetadata) -> bool
fn eq(&self, other: &ModelMetadata) -> bool
impl Eq for ModelMetadata
impl StructuralEq for ModelMetadata
impl StructuralPartialEq for ModelMetadata
Auto Trait Implementations
impl RefUnwindSafe for ModelMetadata
impl Send for ModelMetadata
impl Sync for ModelMetadata
impl Unpin for ModelMetadata
impl UnwindSafe for ModelMetadata
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more