pub enum StyleProfileError {
EmptyAllowedPool {
relation: RstRelation,
},
InvalidLengthBoundaries {
short_max_words: u16,
medium_max_words: u16,
},
HedgingOffsetOutOfRange {
offset: i8,
},
InvalidLengthProportion {
which: &'static str,
value: f32,
},
}Expand description
Validation error returned by StyleProfile::validate and
StyleProfileBuilder::build.
Variants§
EmptyAllowedPool
connectives.allowed[relation] = [] was set explicitly. An empty
pool would force fallback every time — almost always a footgun.
Fields
§
relation: RstRelationInvalidLengthBoundaries
length_distribution.medium_max_words < length_distribution.short_max_words.
HedgingOffsetOutOfRange
hedging.offset outside the documented -50..=+50 range.
InvalidLengthProportion
Length-distribution proportion was negative or non-finite.
Trait Implementations§
Source§impl Clone for StyleProfileError
impl Clone for StyleProfileError
Source§fn clone(&self) -> StyleProfileError
fn clone(&self) -> StyleProfileError
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 StyleProfileError
impl Debug for StyleProfileError
Source§impl Display for StyleProfileError
impl Display for StyleProfileError
Source§impl Error for StyleProfileError
Available on crate feature std only.
impl Error for StyleProfileError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for StyleProfileError
impl PartialEq for StyleProfileError
Source§fn eq(&self, other: &StyleProfileError) -> bool
fn eq(&self, other: &StyleProfileError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StyleProfileError
Auto Trait Implementations§
impl Freeze for StyleProfileError
impl RefUnwindSafe for StyleProfileError
impl Send for StyleProfileError
impl Sync for StyleProfileError
impl Unpin for StyleProfileError
impl UnsafeUnpin for StyleProfileError
impl UnwindSafe for StyleProfileError
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