Skip to main content

Modifier

Struct Modifier 

Source
#[repr(transparent)]
pub struct Modifier(pub u16);
Expand description

Modifier flags (2 bytes)

Controls styling and attributes of opcode output. Bit layout:

Bit:  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
      [--VOICE--] [--TONE--] [-WARM-] [--FORMAT--] [ACCURACY] [URGENCY]
  • Voice (bits 15-14): Speaking style - Neutral, Formal, Casual, Technical
  • Tone (bits 13-12): Emotional tone - Neutral, Positive, Empathetic, Cautious
  • Warmth (bits 11-10): Interpersonal warmth - Cold, Neutral, Warm, VeryWarm
  • Format (bits 9-8): Output format - Prose, Bulleted, Numbered, Structured
  • Accuracy (bits 7-6): Confidence level - Low, Medium, High, Verified
  • Urgency (bits 5-4): Priority level - Low, Normal, High, Critical
  • Reserved (bits 3-0): For future use

Tuple Fields§

§0: u16

Implementations§

Source§

impl Modifier

Source

pub const VOICE_NEUTRAL: Self

Source

pub const VOICE_FORMAL: Self

Source

pub const VOICE_CASUAL: Self

Source

pub const VOICE_TECHNICAL: Self

Source

pub const TONE_NEUTRAL: Self

Source

pub const TONE_POSITIVE: Self

Source

pub const TONE_EMPATHETIC: Self

Source

pub const TONE_CAUTIOUS: Self

Source

pub const WARMTH_COLD: Self

Source

pub const WARMTH_NEUTRAL: Self

Source

pub const WARMTH_WARM: Self

Source

pub const WARMTH_VERY_WARM: Self

Source

pub const FORMAT_PROSE: Self

Source

pub const FORMAT_BULLETED: Self

Source

pub const FORMAT_NUMBERED: Self

Source

pub const FORMAT_STRUCTURED: Self

Source

pub const ACCURACY_LOW: Self

Source

pub const ACCURACY_MEDIUM: Self

Source

pub const ACCURACY_HIGH: Self

Source

pub const ACCURACY_VERIFIED: Self

Source

pub const URGENCY_LOW: Self

Source

pub const URGENCY_NORMAL: Self

Source

pub const URGENCY_HIGH: Self

Source

pub const URGENCY_CRITICAL: Self

Source

pub const fn from_u16(value: u16) -> Self

Create from raw u16 value

Source

pub const fn as_u16(&self) -> u16

Get raw u16 value

Source

pub const fn voice(&self) -> Voice

Get voice style

Source

pub const fn tone(&self) -> Tone

Get tone

Source

pub const fn warmth(&self) -> Warmth

Get warmth level

Source

pub const fn format(&self) -> Format

Get output format

Source

pub const fn accuracy(&self) -> Accuracy

Get accuracy level

Source

pub const fn urgency(&self) -> Urgency

Get urgency level

Source

pub const fn with_voice(self, voice: Voice) -> Self

Set voice style

Source

pub const fn with_tone(self, tone: Tone) -> Self

Set tone

Source

pub const fn with_warmth(self, warmth: Warmth) -> Self

Set warmth level

Source

pub const fn with_format(self, format: Format) -> Self

Set output format

Source

pub const fn with_accuracy(self, accuracy: Accuracy) -> Self

Set accuracy level

Source

pub const fn with_urgency(self, urgency: Urgency) -> Self

Set urgency level

Source

pub const fn crisis() -> Self

Create a crisis-appropriate modifier (empathetic, warm, high urgency)

Source

pub const fn professional() -> Self

Create a professional modifier (formal, neutral warmth)

Source

pub const fn friendly() -> Self

Create a friendly modifier (casual, warm)

Trait Implementations§

Source§

impl Clone for Modifier

Source§

fn clone(&self) -> Modifier

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Modifier

Source§

impl Debug for Modifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Modifier

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Modifier

Source§

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 Modifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Modifier

Source§

impl From<Modifier> for u16

Source§

fn from(modifier: Modifier) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for Modifier

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl Hash for Modifier

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Modifier

Source§

fn eq(&self, other: &Modifier) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Modifier

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Modifier

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.