Struct ComponentValue
pub struct ComponentValue(/* private fields */);Expand description
A descriptive component value such as 10k, 100nF, or STM32F4.
Implementations§
§impl ComponentValue
impl ComponentValue
pub fn new(value: impl AsRef<str>) -> Result<ComponentValue, ComponentTextError>
pub fn new(value: impl AsRef<str>) -> Result<ComponentValue, ComponentTextError>
Creates a component value from non-empty text.
§Errors
Returns [ComponentTextError::Empty] when the trimmed value is empty.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the owned string.
Trait Implementations§
§impl AsRef<str> for ComponentValue
impl AsRef<str> for ComponentValue
§impl Clone for ComponentValue
impl Clone for ComponentValue
§fn clone(&self) -> ComponentValue
fn clone(&self) -> ComponentValue
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 more§impl Debug for ComponentValue
impl Debug for ComponentValue
§impl Display for ComponentValue
impl Display for ComponentValue
§impl FromStr for ComponentValue
impl FromStr for ComponentValue
§impl Hash for ComponentValue
impl Hash for ComponentValue
§impl Ord for ComponentValue
impl Ord for ComponentValue
§impl PartialEq for ComponentValue
impl PartialEq for ComponentValue
§impl PartialOrd for ComponentValue
impl PartialOrd for ComponentValue
impl Eq for ComponentValue
impl StructuralPartialEq for ComponentValue
Auto Trait Implementations§
impl Freeze for ComponentValue
impl RefUnwindSafe for ComponentValue
impl Send for ComponentValue
impl Sync for ComponentValue
impl Unpin for ComponentValue
impl UnsafeUnpin for ComponentValue
impl UnwindSafe for ComponentValue
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