pub enum SclBuildError {
ScaleTooLarge,
}Expand description
Error reported when building an Scl fails.
Variants§
ScaleTooLarge
There are too many items in this scale.
// The number of items is below the threshold.
let mut below = Scl::builder();
for i in 0..65535 {
below = below.push_cents(f64::from(i));
}
assert!(below.build().is_ok());
// The number of items is above the threshold.
let mut above = Scl::builder();
for i in 0..65536 {
above = above.push_cents(f64::from(i));
}
assert_eq!(above.build().unwrap_err(), SclBuildError::ScaleTooLarge);Trait Implementations§
Source§impl Clone for SclBuildError
impl Clone for SclBuildError
Source§fn clone(&self) -> SclBuildError
fn clone(&self) -> SclBuildError
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 SclBuildError
impl Debug for SclBuildError
Source§impl From<SclBuildError> for SclImportError
impl From<SclBuildError> for SclImportError
Source§fn from(v: SclBuildError) -> Self
fn from(v: SclBuildError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SclBuildError
impl PartialEq for SclBuildError
impl Eq for SclBuildError
impl StructuralPartialEq for SclBuildError
Auto Trait Implementations§
impl Freeze for SclBuildError
impl RefUnwindSafe for SclBuildError
impl Send for SclBuildError
impl Sync for SclBuildError
impl Unpin for SclBuildError
impl UnwindSafe for SclBuildError
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