pub struct OptionalCostValue {
pub cost_type: OptionalCost,
pub cost_description: String,
}Expand description
A valued optional cost with a description string.
Mirrors Java’s OptionalCostValue — pairs a cost type with
descriptive text for display purposes.
Fields§
§cost_type: OptionalCost§cost_description: StringImplementations§
Source§impl OptionalCostValue
impl OptionalCostValue
pub fn new(cost_type: OptionalCost, cost_description: String) -> Self
Sourcepub fn get_type(&self) -> OptionalCost
pub fn get_type(&self) -> OptionalCost
Get the optional cost type.
Mirrors Java’s OptionalCostValue.getType().
Trait Implementations§
Source§impl Clone for OptionalCostValue
impl Clone for OptionalCostValue
Source§fn clone(&self) -> OptionalCostValue
fn clone(&self) -> OptionalCostValue
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 OptionalCostValue
impl Debug for OptionalCostValue
Source§impl<'de> Deserialize<'de> for OptionalCostValue
impl<'de> Deserialize<'de> for OptionalCostValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OptionalCostValue
impl Display for OptionalCostValue
Auto Trait Implementations§
impl Freeze for OptionalCostValue
impl RefUnwindSafe for OptionalCostValue
impl Send for OptionalCostValue
impl Sync for OptionalCostValue
impl Unpin for OptionalCostValue
impl UnsafeUnpin for OptionalCostValue
impl UnwindSafe for OptionalCostValue
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.