Enum Op1Enum

Source
pub enum Op1Enum {
Show 43 variants Len(Len), ToInt(ToInt), ToStr(ToStr), Neg(Neg), IsPos(IsPos), IsZero(IsZero), IsNatural(IsNatural), RetainLl(RetainLl), RetainLc(RetainLc), RetainN(RetainN), RetainL(RetainL), RetainLN(RetainLN), Map(Map), Filter(Filter), Uppercase(Uppercase), Lowercase(Lowercase), AsMonth(AsMonth), AsDay(AsDay), AsYear(AsYear), AsWeekDay(AsWeekDay), ParseTime(ParseTime), ParseDate(ParseDate), ParseInt(ParseInt), ParseMonth(ParseMonth), ParseWeekday(ParseWeekday), ParseFloat(ParseFloat), FormatInt(FormatInt), FormatFloat(FormatFloat), FormatTime(FormatTime), FormatMonth(FormatMonth), FormatWeekday(FormatWeekday), FNeg(FNeg), FAbs(FAbs), FIsPos(FIsPos), FExp10(FExp10), IntToFloat(IntToFloat), FloatToInt(FloatToInt), StrToFloat(StrToFloat), FIsZero(FIsZero), FNotNeg(FNotNeg), FLen(FLen), BvNot(BvNot), BvNeg(BvNeg),
}
Expand description

An enum that defines unary operations for expressions within the string synthesis framework.

This enumeration, Op1Enum, includes a wide array of operations that can be applied to a single operand. The operations cover a diverse set of functionalities such as conversions between data types (e.g., ToInt, ToStr, IntToFloat, FloatToInt, StrToFloat), string manipulations like changing case (Uppercase, Lowercase) and retaining specific character types (RetainLl, RetainLc, RetainN, RetainL, RetainLN).

Additionally, the enum supports various mathematical and logical checks (IsPos, IsZero, IsNatural, FIsPos, FIsZero, FNotNeg), numerical operations (Neg, FNeg, FAbs, FExp10), formatting (FormatInt, FormatFloat, FormatTime, FormatMonth, FormatWeekday), and parsing (ParseTime, ParseDate, ParseInt, ParseMonth, ParseWeekday, ParseFloat). It also includes utilities like Len for measuring length and several date-related transformations (AsMonth, AsDay, AsYear, AsWeekDay). This diverse suite of operations enables flexible and efficient manipulation of data types required for string synthesis challenges.

Variants§

§

Len(Len)

§

ToInt(ToInt)

§

ToStr(ToStr)

§

Neg(Neg)

§

IsPos(IsPos)

§

IsZero(IsZero)

§

IsNatural(IsNatural)

§

RetainLl(RetainLl)

§

RetainLc(RetainLc)

§

RetainN(RetainN)

§

RetainL(RetainL)

§

RetainLN(RetainLN)

§

Map(Map)

§

Filter(Filter)

§

Uppercase(Uppercase)

§

Lowercase(Lowercase)

§

AsMonth(AsMonth)

§

AsDay(AsDay)

§

AsYear(AsYear)

§

AsWeekDay(AsWeekDay)

§

ParseTime(ParseTime)

§

ParseDate(ParseDate)

§

ParseInt(ParseInt)

§

ParseMonth(ParseMonth)

§

ParseWeekday(ParseWeekday)

§

ParseFloat(ParseFloat)

§

FormatInt(FormatInt)

§

FormatFloat(FormatFloat)

§

FormatTime(FormatTime)

§

FormatMonth(FormatMonth)

§

FormatWeekday(FormatWeekday)

§

FNeg(FNeg)

§

FAbs(FAbs)

§

FIsPos(FIsPos)

§

FExp10(FExp10)

§

IntToFloat(IntToFloat)

§

FloatToInt(FloatToInt)

§

StrToFloat(StrToFloat)

§

FIsZero(FIsZero)

§

FNotNeg(FNotNeg)

§

FLen(FLen)

§

BvNot(BvNot)

§

BvNeg(BvNeg)

Implementations§

Source§

impl Op1Enum

Source

pub fn eval(&self, a1: Value) -> Value

Evaluates a unary operation on a given value and returns the result.

This function takes a reference to self as an Op1Enum instance and a Value representing the operand for the unary operation. It attempts to evaluate the operation by calling the try_eval method with the provided argument and returns the second element of the resulting tuple, which is the computed Value. This method assumes that the operation is successfully executed, as it directly takes the result part of the tuple from try_eval.

Source§

impl Op1Enum

Source

pub fn from_name(name: &str, config: &Config) -> Self

Implements a method to create an instance of the enumeration from a string identifier.

This method takes a string name representing the desired operation and a config reference, which helps configure certain operational aspects, to return the corresponding Op1Enum variant. Internally, it uses a macro, _do, to iterate over potential operations and check if their names match the given string identifier. If a match is found, it returns the operation configured with the supplied configuration. For specific operations like “str.len”, “str.from_int”, and “str.to_int”, direct matches that do not utilize the macro are provided for convenience. If no operation matches the given string name, the method panics with an “Unknown Operator” error message.

Source

pub fn name(&self) -> &'static str

Provides a method to retrieve the name of a unary operation as a static string.

The method uses a macro to match the current instance of the enumeration against all possible variants of unary operations defined by Op1Enum. If the current instance matches one of these variants, it returns the corresponding name by invoking the name() method of the matched operation. It leverages a macro named for_all_op1! to iterate through all operation variants, ensuring extensibility and maintainability when new operations are introduced. If no match is found, the method panics, indicating an unexpected state or missing variant handling.

Source§

impl Op1Enum

Source

pub fn is_formatting_op(&self) -> bool

Source

pub fn format_all( &self, input: &'static [&'static str], ) -> Option<(Op1Enum, Value, Value, Value)>

Trait Implementations§

Source§

impl Clone for Op1Enum

Source§

fn clone(&self) -> Op1Enum

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Op1Enum

Source§

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

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

impl Display for Op1Enum

Source§

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

Formats the operation represented by Op1Enum for printing.

This implementation attempts to match the enum variant of the Op1Enum and writes its argument to the provided formatter. The macro crate::for_all_op1!() is used to iterate over all possible unary operation variants, facilitating the matching process. If an appropriate match is found, it writes the associated argument to the formatter. If no match is found using the macro, it completes without any action. This approach enables a concise and consistent output for each variant when formatted.

Source§

impl Enumerator1 for Op1Enum

Source§

fn enumerate( &self, this: &'static Op1Enum, exec: &'static Executor, opnt: [usize; 1], ) -> Result<(), ()>

Source§

impl From<AsDay> for Op1Enum

Source§

fn from(v: AsDay) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<AsMonth> for Op1Enum

Source§

fn from(v: AsMonth) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<AsWeekDay> for Op1Enum

Source§

fn from(v: AsWeekDay) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<AsYear> for Op1Enum

Source§

fn from(v: AsYear) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<BvNeg> for Op1Enum

Source§

fn from(v: BvNeg) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<BvNot> for Op1Enum

Source§

fn from(v: BvNot) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FAbs> for Op1Enum

Source§

fn from(v: FAbs) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FExp10> for Op1Enum

Source§

fn from(v: FExp10) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FIsPos> for Op1Enum

Source§

fn from(v: FIsPos) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FIsZero> for Op1Enum

Source§

fn from(v: FIsZero) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FLen> for Op1Enum

Source§

fn from(v: FLen) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FNeg> for Op1Enum

Source§

fn from(v: FNeg) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FNotNeg> for Op1Enum

Source§

fn from(v: FNotNeg) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Filter> for Op1Enum

Source§

fn from(v: Filter) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FloatToInt> for Op1Enum

Source§

fn from(v: FloatToInt) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FormatFloat> for Op1Enum

Source§

fn from(v: FormatFloat) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FormatInt> for Op1Enum

Source§

fn from(v: FormatInt) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FormatMonth> for Op1Enum

Source§

fn from(v: FormatMonth) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FormatTime> for Op1Enum

Source§

fn from(v: FormatTime) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<FormatWeekday> for Op1Enum

Source§

fn from(v: FormatWeekday) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<IntToFloat> for Op1Enum

Source§

fn from(v: IntToFloat) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<IsNatural> for Op1Enum

Source§

fn from(v: IsNatural) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<IsPos> for Op1Enum

Source§

fn from(v: IsPos) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<IsZero> for Op1Enum

Source§

fn from(v: IsZero) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Len> for Op1Enum

Source§

fn from(v: Len) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Lowercase> for Op1Enum

Source§

fn from(v: Lowercase) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Map> for Op1Enum

Source§

fn from(v: Map) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Neg> for Op1Enum

Source§

fn from(v: Neg) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseDate> for Op1Enum

Source§

fn from(v: ParseDate) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseFloat> for Op1Enum

Source§

fn from(v: ParseFloat) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseInt> for Op1Enum

Source§

fn from(v: ParseInt) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseMonth> for Op1Enum

Source§

fn from(v: ParseMonth) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseTime> for Op1Enum

Source§

fn from(v: ParseTime) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ParseWeekday> for Op1Enum

Source§

fn from(v: ParseWeekday) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<RetainL> for Op1Enum

Source§

fn from(v: RetainL) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<RetainLN> for Op1Enum

Source§

fn from(v: RetainLN) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<RetainLc> for Op1Enum

Source§

fn from(v: RetainLc) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<RetainLl> for Op1Enum

Source§

fn from(v: RetainLl) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<RetainN> for Op1Enum

Source§

fn from(v: RetainN) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<StrToFloat> for Op1Enum

Source§

fn from(v: StrToFloat) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ToInt> for Op1Enum

Source§

fn from(v: ToInt) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<ToStr> for Op1Enum

Source§

fn from(v: ToStr) -> Op1Enum

Converts to this type from the input type.
Source§

impl From<Uppercase> for Op1Enum

Source§

fn from(v: Uppercase) -> Op1Enum

Converts to this type from the input type.
Source§

impl Hash for Op1Enum

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 Op1 for Op1Enum

Source§

fn cost(&self) -> usize

Source§

fn try_eval(&self, __enum_dispatch_arg_0: Value) -> (bool, Value)

Source§

impl ParsingOp for Op1Enum

Source§

fn parse_into(&self, input: &'static str) -> Vec<(&'static str, ConstValue)>

Source§

fn parse_all(&self, ctx: &Context) -> Vec<(&'static str, ConstValue)>

Source§

impl PartialEq for Op1Enum

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 TryInto<AsDay> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<AsDay, <Self as TryInto<AsDay>>::Error>

Performs the conversion.
Source§

impl TryInto<AsMonth> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<AsMonth, <Self as TryInto<AsMonth>>::Error>

Performs the conversion.
Source§

impl TryInto<AsWeekDay> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<AsWeekDay, <Self as TryInto<AsWeekDay>>::Error>

Performs the conversion.
Source§

impl TryInto<AsYear> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<AsYear, <Self as TryInto<AsYear>>::Error>

Performs the conversion.
Source§

impl TryInto<BvNeg> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<BvNeg, <Self as TryInto<BvNeg>>::Error>

Performs the conversion.
Source§

impl TryInto<BvNot> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<BvNot, <Self as TryInto<BvNot>>::Error>

Performs the conversion.
Source§

impl TryInto<FAbs> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FAbs, <Self as TryInto<FAbs>>::Error>

Performs the conversion.
Source§

impl TryInto<FExp10> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FExp10, <Self as TryInto<FExp10>>::Error>

Performs the conversion.
Source§

impl TryInto<FIsPos> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FIsPos, <Self as TryInto<FIsPos>>::Error>

Performs the conversion.
Source§

impl TryInto<FIsZero> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FIsZero, <Self as TryInto<FIsZero>>::Error>

Performs the conversion.
Source§

impl TryInto<FLen> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FLen, <Self as TryInto<FLen>>::Error>

Performs the conversion.
Source§

impl TryInto<FNeg> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FNeg, <Self as TryInto<FNeg>>::Error>

Performs the conversion.
Source§

impl TryInto<FNotNeg> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FNotNeg, <Self as TryInto<FNotNeg>>::Error>

Performs the conversion.
Source§

impl TryInto<Filter> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Filter, <Self as TryInto<Filter>>::Error>

Performs the conversion.
Source§

impl TryInto<FloatToInt> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FloatToInt, <Self as TryInto<FloatToInt>>::Error>

Performs the conversion.
Source§

impl TryInto<FormatFloat> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FormatFloat, <Self as TryInto<FormatFloat>>::Error>

Performs the conversion.
Source§

impl TryInto<FormatInt> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FormatInt, <Self as TryInto<FormatInt>>::Error>

Performs the conversion.
Source§

impl TryInto<FormatMonth> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FormatMonth, <Self as TryInto<FormatMonth>>::Error>

Performs the conversion.
Source§

impl TryInto<FormatTime> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<FormatTime, <Self as TryInto<FormatTime>>::Error>

Performs the conversion.
Source§

impl TryInto<FormatWeekday> for Op1Enum

Source§

type Error = &'static str

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

fn try_into( self, ) -> Result<FormatWeekday, <Self as TryInto<FormatWeekday>>::Error>

Performs the conversion.
Source§

impl TryInto<IntToFloat> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<IntToFloat, <Self as TryInto<IntToFloat>>::Error>

Performs the conversion.
Source§

impl TryInto<IsNatural> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<IsNatural, <Self as TryInto<IsNatural>>::Error>

Performs the conversion.
Source§

impl TryInto<IsPos> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<IsPos, <Self as TryInto<IsPos>>::Error>

Performs the conversion.
Source§

impl TryInto<IsZero> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<IsZero, <Self as TryInto<IsZero>>::Error>

Performs the conversion.
Source§

impl TryInto<Len> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Len, <Self as TryInto<Len>>::Error>

Performs the conversion.
Source§

impl TryInto<Lowercase> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Lowercase, <Self as TryInto<Lowercase>>::Error>

Performs the conversion.
Source§

impl TryInto<Map> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Map, <Self as TryInto<Map>>::Error>

Performs the conversion.
Source§

impl TryInto<Neg> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Neg, <Self as TryInto<Neg>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseDate> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ParseDate, <Self as TryInto<ParseDate>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseFloat> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ParseFloat, <Self as TryInto<ParseFloat>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseInt> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ParseInt, <Self as TryInto<ParseInt>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseMonth> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ParseMonth, <Self as TryInto<ParseMonth>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseTime> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ParseTime, <Self as TryInto<ParseTime>>::Error>

Performs the conversion.
Source§

impl TryInto<ParseWeekday> for Op1Enum

Source§

type Error = &'static str

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

fn try_into( self, ) -> Result<ParseWeekday, <Self as TryInto<ParseWeekday>>::Error>

Performs the conversion.
Source§

impl TryInto<RetainL> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<RetainL, <Self as TryInto<RetainL>>::Error>

Performs the conversion.
Source§

impl TryInto<RetainLN> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<RetainLN, <Self as TryInto<RetainLN>>::Error>

Performs the conversion.
Source§

impl TryInto<RetainLc> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<RetainLc, <Self as TryInto<RetainLc>>::Error>

Performs the conversion.
Source§

impl TryInto<RetainLl> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<RetainLl, <Self as TryInto<RetainLl>>::Error>

Performs the conversion.
Source§

impl TryInto<RetainN> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<RetainN, <Self as TryInto<RetainN>>::Error>

Performs the conversion.
Source§

impl TryInto<StrToFloat> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<StrToFloat, <Self as TryInto<StrToFloat>>::Error>

Performs the conversion.
Source§

impl TryInto<ToInt> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ToInt, <Self as TryInto<ToInt>>::Error>

Performs the conversion.
Source§

impl TryInto<ToStr> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<ToStr, <Self as TryInto<ToStr>>::Error>

Performs the conversion.
Source§

impl TryInto<Uppercase> for Op1Enum

Source§

type Error = &'static str

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

fn try_into(self) -> Result<Uppercase, <Self as TryInto<Uppercase>>::Error>

Performs the conversion.
Source§

impl Eq for Op1Enum

Source§

impl StructuralPartialEq for Op1Enum

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AllocForAny<T> for T

Source§

fn galloc(self) -> &'static T

Provides a method to allocate an instance of T on the heap with a static lifetime.

This implementation of galloc takes ownership of the T instance and uses the alloc function to place it in a location with a static lifetime, presumably managing it in a way that ensures its persistence for the duration of the program. This can be particularly useful for scenarios where a static lifetime is required, such as when interfacing with systems or patterns that necessitate global state or long-lived data.

Source§

fn galloc_mut(self) -> &'static T

Provides a method that moves the instance and returns a reference to it allocated with a static lifetime.

This method utilizes alloc_mut to perform the allocation, likely involving allocating the resource in a manner that ensures it lives for the entire duration of the application. These semantics allow the user to safely assume that the reference will not expire during the program’s execution, making it suitable for long-lived data structures or operations that require such guarantees.

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, dst: *mut u8)

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V