RynaContext

Struct RynaContext 

Source
pub struct RynaContext {
Show 23 fields pub type_templates: Vec<TypeTemplate>, pub interfaces: Vec<Interface>, pub interface_impls: Vec<InterfaceImpl>, pub unary_ops: Vec<Operator>, pub binary_ops: Vec<Operator>, pub nary_ops: Vec<Operator>, pub sorted_ops: Vec<Operator>, pub functions: Vec<Function>, pub macros: Vec<RynaMacro>, pub variables: Vec<Object>, pub var_map: VariableMap, pub registers: Vec<usize>, pub num_globals: usize, pub lambdas: usize, pub lambda_code_length: usize, pub lambda_code: Vec<RynaInstruction>, pub lambda_positions: HashMap<usize, usize>, pub cache: RynaCache, pub optimize: bool, pub module_name: Arc<String>, pub module_path: String, pub captured_output: RefCell<String>, pub program_input: Vec<String>,
}

Fields§

§type_templates: Vec<TypeTemplate>§interfaces: Vec<Interface>§interface_impls: Vec<InterfaceImpl>§unary_ops: Vec<Operator>§binary_ops: Vec<Operator>§nary_ops: Vec<Operator>§sorted_ops: Vec<Operator>§functions: Vec<Function>§macros: Vec<RynaMacro>§variables: Vec<Object>§var_map: VariableMap§registers: Vec<usize>§num_globals: usize§lambdas: usize§lambda_code_length: usize§lambda_code: Vec<RynaInstruction>§lambda_positions: HashMap<usize, usize>§cache: RynaCache§optimize: bool§module_name: Arc<String>§module_path: String§captured_output: RefCell<String>§program_input: Vec<String>

Implementations§

Source§

impl RynaContext

Source

pub fn redefine_type( &mut self, l: Location, annotations: Vec<Annotation>, representation: String, params: Vec<String>, attributes: Vec<(String, Type)>, alias: Option<Type>, patterns: Vec<Pattern>, parser: Option<ParsingFunction>, ) -> Result<(), String>

Source

pub fn define_type( &mut self, l: Location, annotations: Vec<Annotation>, representation: String, params: Vec<String>, attributes: Vec<(String, Type)>, alias: Option<Type>, patterns: Vec<Pattern>, parser: Option<ParsingFunction>, ) -> Result<(), String>

Source

pub fn redefine_interface( &mut self, l: Location, annotations: Vec<Annotation>, representation: String, params: Vec<String>, fns: Vec<InterfaceFunctionHeader>, uns: Vec<InterfaceUnaryOpHeader>, bin: Vec<InterfaceBinaryOpHeader>, nary: Vec<InterfaceNaryOpHeader>, ) -> Result<(), String>

Source

pub fn define_interface( &mut self, l: Location, annotations: Vec<Annotation>, representation: String, params: Vec<String>, fns: Vec<InterfaceFunctionHeader>, uns: Vec<InterfaceUnaryOpHeader>, bin: Vec<InterfaceBinaryOpHeader>, nary: Vec<InterfaceNaryOpHeader>, ) -> Result<(), String>

Source

pub fn define_interface_impl( &mut self, representation: String, templates: Vec<String>, tp: Type, t_args: Vec<Type>, ) -> Result<(), String>

Source

pub fn implements_interface( &self, t: &Type, constraint: &InterfaceConstraint, t_assignments: &mut HashMap<usize, Type>, t_deps: &mut HashMap<usize, HashSet<usize>>, ) -> bool

Source

pub fn define_unary_operator( &mut self, representation: String, prefix: bool, precedence: usize, ) -> Result<(), String>

Source

pub fn get_unary_operations( &self, id: usize, a: Type, ) -> Vec<&Operation<UnaryFunctionFn>>

Source

pub fn define_native_unary_operation( &mut self, id: usize, templates: usize, a: Type, ret: Type, f: fn(&Vec<Type>, &Type, Object) -> Result<Object, String>, ) -> Result<usize, String>

Source

pub fn define_unary_operation( &mut self, l: Location, annot: Vec<Annotation>, id: usize, templates: usize, a: Type, ret: Type, f: OptUnaryFunctionFn, ) -> Result<usize, String>

Source

pub fn define_binary_operator( &mut self, representation: String, right_associative: bool, precedence: usize, ) -> Result<(), String>

Source

pub fn get_binary_operations( &self, id: usize, a: Type, b: Type, ) -> Vec<&Operation<BinaryFunctionFn>>

Source

pub fn define_native_binary_operation( &mut self, id: usize, templates: usize, a: Type, b: Type, ret: Type, f: BinaryFunctionFn, ) -> Result<usize, String>

Source

pub fn define_binary_operation( &mut self, l: Location, annot: Vec<Annotation>, id: usize, templates: usize, a: Type, b: Type, ret: Type, f: OptBinaryFunctionFn, ) -> Result<usize, String>

Source

pub fn define_nary_operator( &mut self, open_rep: String, close_rep: String, precedence: usize, ) -> Result<(), String>

Source

pub fn get_nary_operations( &self, id: usize, from: Type, args: &[Type], ) -> Vec<&Operation<NaryFunctionFn>>

Source

pub fn define_native_nary_operation( &mut self, id: usize, templates: usize, from: Type, args: &[Type], ret: Type, f: NaryFunctionFn, ) -> Result<usize, String>

Source

pub fn define_nary_operation( &mut self, l: Location, annot: Vec<Annotation>, id: usize, templates: usize, from: Type, args: &[Type], ret: Type, f: OptNaryFunctionFn, ) -> Result<usize, String>

Source

pub fn define_function(&mut self, name: String) -> Result<usize, String>

Source

pub fn get_function_overloads( &self, id: usize, templates: &[Type], args: &[Type], ) -> Vec<&FunctionOverload>

Source

pub fn define_native_function_overload( &mut self, id: usize, templates: usize, args: &[Type], ret: Type, f: FunctionOverloadFn, ) -> Result<usize, String>

Source

pub fn define_function_overload( &mut self, l: Location, annot: Vec<Annotation>, id: usize, templates: usize, args: &[Type], ret: Type, f: OptFunctionOverloadFn, ) -> Result<usize, String>

Source

pub fn reset_registers(&mut self)

Source

pub fn compute_num_globals(&mut self)

Source§

impl RynaContext

Source

pub fn to_string(&self, expr: &RynaExpr) -> String

Source§

impl RynaContext

Source

pub fn located<'a, O, P1: FnMut(Span<'a>) -> PResult<'a, O>>( &'a self, parser: P1, ) -> impl FnMut(Span<'a>) -> PResult<'a, (Location, O)>

Source

pub fn get_type_id(&self, name: String) -> Result<usize, String>

Source

pub fn get_interface_id(&self, name: String) -> Result<usize, String>

Source

pub fn get_function_id(&self, name: String) -> Result<usize, String>

Source

pub fn get_function(&self, name: &str) -> Option<&Function>

Source

pub fn get_interface(&self, name: &str) -> Option<&Interface>

Source

pub fn get_type_template(&self, name: &str) -> Option<&TypeTemplate>

Source

pub fn type_parser<'a>(&'a self, input: Span<'a>) -> PResult<'a, Type>

Source

pub fn parse_literal_type<'a>( &'a self, c_type: &'a TypeTemplate, input: Span<'a>, cache: &PCache<'a>, ) -> PResult<'a, Object>

Source

pub fn ryna_expr_parser<'a>( &'a self, input: Span<'a>, cache: &PCache<'a>, ) -> PResult<'a, RynaExpr>

Source

pub fn ryna_operators_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_function_headers_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<(String, Option<Vec<String>>, Vec<(String, Type)>, Type)>>

Source

pub fn ryna_operations_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_macros_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_interface_implementation_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_interface_definition_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_interface_definition_names_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<String>>

Source

pub fn ryna_class_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, Vec<RynaExpr>>

Source

pub fn ryna_class_names_parser<'a>( &'a self, input: Span<'a>, ) -> PResult<'a, HashSet<String>>

Source

pub fn ryna_parser<'a>(&'a self, input: Span<'a>) -> PResult<'a, Vec<RynaExpr>>

Source§

impl RynaContext

Source

pub fn get_first_unary_op( &self, id: usize, arg_type: Type, call_templates: Option<Vec<Type>>, sub_t: bool, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn is_unary_op_ambiguous( &self, id: usize, arg_type: Type, ) -> Option<Vec<(Type, Type)>>

Source

pub fn get_first_binary_op( &self, id: usize, a_type: Type, b_type: Type, call_templates: Option<Vec<Type>>, sub_t: bool, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn is_binary_op_ambiguous( &self, id: usize, a_type: Type, b_type: Type, ) -> Option<Vec<(Type, Type, Type)>>

Source

pub fn get_first_nary_op( &self, id: usize, a_type: Type, b_type: Vec<Type>, call_templates: Option<Vec<Type>>, sub_t: bool, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn is_nary_op_ambiguous( &self, id: usize, a_type: Type, b_type: Vec<Type>, ) -> Option<Vec<(Type, Vec<Type>, Type)>>

Source

pub fn get_first_function_overload( &self, id: usize, arg_type: Vec<Type>, call_templates: Option<Vec<Type>>, sub_t: bool, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn is_function_overload_ambiguous( &self, id: usize, arg_type: Vec<Type>, ) -> Option<Vec<(Type, Type)>>

Source

pub fn implements_iterable(&self, container_type: &Type) -> bool

Source

pub fn get_iterator_type( &self, container_type: &Type, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn get_iterator_output_type( &self, iterator_type: &Type, l: &Location, ) -> Result<(usize, Type, bool, Vec<Type>), RynaError>

Source

pub fn implements_destroyable(&self, t: &Type) -> bool

Source

pub fn infer_type(&self, expr: &RynaExpr) -> Result<Type, RynaError>

Source§

impl RynaContext

Source

pub fn check_forbidden_fn_names(name: &String)

Source

pub fn ensured_return_check(expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn ensured_return_check_body( lines: &Vec<RynaExpr>, l: &Location, instance: &str, ) -> Result<(), RynaError>

Source

pub fn return_check( &self, expr: &RynaExpr, ret_type: &Option<Type>, ) -> Result<(), RynaError>

Source

pub fn ambiguity_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn break_continue_check( expr: &RynaExpr, allowed: bool, ) -> Result<(), RynaError>

Source

pub fn invalid_type_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn check_type_well_formed( &self, t: &Type, l: &Location, ) -> Result<(), RynaError>

Source

pub fn type_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn implicit_syntax_check( &self, name: &String, templates: &[String], attributes: &[(String, Type)], syntaxes: &Vec<Pattern>, ) -> Result<(), String>

Source

pub fn class_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn macro_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn interface_impl_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn no_template_check_type( &self, t: &Type, l: &Location, ) -> Result<(), RynaError>

Source

pub fn no_template_check_types( &self, t: &[Type], l: &Location, ) -> Result<(), RynaError>

Source

pub fn no_template_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn lambda_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn repeated_args( &self, args: &Vec<&String>, item: &str, ) -> Result<(), String>

Source

pub fn repeated_arguments_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn check_test_annotation( &self, annot: &Annotation, t: &Vec<String>, args: &Vec<(String, Type)>, ret: &Type, ) -> Result<(), String>

Source

pub fn check_fn_doc_annotation( &self, annot: &Annotation, args: &Vec<(String, Type)>, ) -> Result<(), String>

Source

pub fn check_noret_doc_annotation( &self, annot: &Annotation, args: &Vec<(String, Type)>, ) -> Result<(), String>

Source

pub fn annotation_checks(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source

pub fn check_formats(&self, expr: &RynaExpr)

Source

pub fn static_check_expected( &self, expr: &RynaExpr, expected: &Option<Type>, ) -> Result<(), RynaError>

Source

pub fn static_check(&self, expr: &RynaExpr) -> Result<(), RynaError>

Source§

impl RynaContext

Source

pub fn transform_term(&mut self, expr: &mut RynaExpr) -> Result<(), RynaError>

Source

pub fn compile_vars_and_infer( &mut self, body: &mut Vec<RynaExpr>, args: &Vec<(String, Type)>, is_dtor: bool, ) -> Result<usize, RynaError>

Source

pub fn compile( &mut self, body: &mut Vec<RynaExpr>, args: &Vec<(String, Type)>, is_dtor: bool, ) -> Result<(), RynaError>

Source

pub fn compile_isolated( &mut self, body: &mut Vec<RynaExpr>, args: &Vec<(String, Type)>, is_dtor: bool, ) -> Result<(), RynaError>

Source§

impl RynaContext

Source

pub fn get_inner_dep_graph( &mut self, lines: &[RynaExpr], ) -> Result<DirectedGraph<(ImportType, usize), ()>, RynaError>

Source

pub fn get_inner_dep_graph_body( &self, lines: &Vec<RynaExpr>, parent: &(ImportType, usize), deps: &mut DirectedGraph<(ImportType, usize), ()>, )

Source

pub fn get_inner_dep_graph_expr( &self, expr: &RynaExpr, parent: &(ImportType, usize), deps: &mut DirectedGraph<(ImportType, usize), ()>, )

Source

pub fn get_template_calls_body( &mut self, lines: &Vec<RynaExpr>, ) -> Result<(), RynaError>

Source

pub fn get_template_calls_pass( &mut self, expr: &RynaExpr, changed: &mut bool, ) -> Result<(), RynaError>

Source

pub fn get_template_calls_body_pass( &mut self, lines: &Vec<RynaExpr>, changed: &mut bool, ) -> Result<(), RynaError>

Source

pub fn subtitute_type_params_expr( expr: &mut RynaExpr, templates: &HashMap<usize, Type>, )

Source

pub fn compile_lambda_expr( &mut self, line: &RynaExpr, only_length: bool, ) -> Result<(), RynaError>

Source

pub fn compile_lambdas( &mut self, lines: &Vec<RynaExpr>, only_length: bool, ) -> Result<(), RynaError>

Source

pub fn compile_function_lambdas( &mut self, lines: &Vec<RynaExpr>, only_length: bool, ) -> Result<(), RynaError>

Source

pub fn generate_array_destructor( &self, tm: &Type, ) -> Result<Vec<RynaExpr>, RynaError>

Source

pub fn generate_destructor_for_type( &self, t: &Type, ) -> Result<Vec<RynaExpr>, RynaError>

Source

pub fn generate_destructors( &mut self, lines: &mut Vec<RynaExpr>, ) -> Result<(), RynaError>

Source

pub fn compiled_form( &mut self, lines: &Vec<RynaExpr>, ) -> Result<Vec<RynaInstruction>, RynaError>

Source

pub fn is_dtor_id(&self, id: usize) -> bool

Source

pub fn compiled_form_size( &self, expr: &RynaExpr, root: bool, root_counter: &mut usize, ) -> Result<usize, RynaError>

Source

pub fn compiled_form_body_size( &self, lines: &Vec<RynaExpr>, root: bool, ) -> Result<usize, RynaError>

Source

pub fn compiled_literal_size(obj: &Object) -> usize

Source

pub fn compile_literal(obj: &Object) -> Vec<RynaInstruction>

Source

pub fn compiled_form_expr( &self, expr: &RynaExpr, root: bool, ) -> Result<Vec<RynaInstruction>, RynaError>

Source

pub fn compiled_form_body( &self, lines: &[RynaExpr], ) -> Result<Vec<RynaInstruction>, RynaError>

Source

pub fn define_module_macro( &mut self, definition: RynaExpr, defined_macros: &mut FxHashSet<Location>, ) -> Result<bool, RynaError>

Source

pub fn define_module_class( &mut self, definition: RynaExpr, ) -> Result<(), RynaError>

Source

pub fn define_module_macros(&mut self, code: &String) -> Result<(), RynaError>

Source

pub fn define_module_classes(&mut self, code: &String) -> Result<(), RynaError>

Source

pub fn define_module_operators( &mut self, code: &String, ) -> Result<(), RynaError>

Source

pub fn define_module_functions( &mut self, code: &String, ) -> Result<(), RynaError>

Source

pub fn define_module_operations( &mut self, code: &String, ) -> Result<(), RynaError>

Source

pub fn define_module_function_overloads( &mut self, lines: &Vec<RynaExpr>, ) -> Result<(), RynaError>

Source

pub fn parse_ryna_module( &mut self, code: &String, ) -> Result<Vec<RynaExpr>, RynaError>

Source

pub fn map_ryna_interface( &mut self, other: &RynaContext, id: usize, id_mapper: &mut IdMapper, l: &Location, ) -> Result<usize, String>

Source

pub fn map_ryna_class( &mut self, other: &RynaContext, id: usize, id_mapper: &mut IdMapper, l: &Location, ) -> Result<usize, String>

Source

pub fn map_ryna_expression( &mut self, expr: &mut RynaExpr, ctx: &RynaContext, id_mapper: &mut IdMapper, ) -> Result<(), RynaError>

Source

pub fn import_code( &mut self, code: &[RynaExpr], source: &Vec<(String, usize)>, ctx: &RynaContext, imports: &Imports, ) -> Result<(Vec<RynaExpr>, Vec<(String, usize)>), RynaError>

Source

pub fn parse_with_dependencies( &mut self, name: &str, code: &String, modules: &HashMap<String, &RynaModule>, ) -> Result<(Vec<RynaExpr>, Vec<(String, usize)>), RynaError>

Source

pub fn parse_without_precompiling( &mut self, code: &String, ) -> Result<Vec<RynaExpr>, RynaError>

Source

pub fn compile_globals( &mut self, lines: &mut Vec<RynaExpr>, ) -> Result<(), RynaError>

Source

pub fn precompile_module( &mut self, lines: &mut Vec<RynaExpr>, ) -> Result<(), RynaError>

Source

pub fn parse_and_precompile( &mut self, code: &String, ) -> Result<Vec<RynaExpr>, RynaError>

Source

pub fn parse_and_compile( &mut self, code: &String, ) -> Result<Vec<RynaInstruction>, RynaError>

Source§

impl RynaContext

Source

pub fn count_usages_expr( expr: &RynaExpr, var_usages: &mut FxHashMap<usize, usize>, offset: usize, )

Source

pub fn insert_moves_expr( &self, expr: &mut RynaExpr, var_usages: &mut FxHashMap<usize, usize>, )

Source

pub fn insert_moves(&self, body: &mut Vec<RynaExpr>)

Source

pub fn strength_reduction_expr(&self, expr: &mut RynaExpr)

Source

pub fn inlining_weight(&self, body: &Vec<RynaExpr>) -> f32

Source

pub fn max_variable(expr: &RynaExpr, offset: &mut usize)

Source

pub fn offset_variables(expr: &mut RynaExpr, offset: usize)

Source

pub fn inline_body( &self, body: Vec<RynaExpr>, args: Vec<RynaExpr>, var_offset: &mut usize, l: &Location, ) -> Vec<RynaExpr>

Source

pub fn inline_functions_expr(&self, expr: &mut RynaExpr, offset: &mut usize)

Source

pub fn inline_functions(&self, body: &mut Vec<RynaExpr>, offset: &mut usize)

Source

pub fn strength_reduction(&self, body: &mut Vec<RynaExpr>)

Source

pub fn optimize(&self, body: &mut Vec<RynaExpr>)

Source

pub fn is_constant_expr( &self, expr: &RynaExpr, consts: &FxHashMap<usize, bool>, ) -> bool

Source

pub fn compute_constant_expr( expr: &RynaExpr, const_exprs: &FxHashMap<usize, RynaExpr>, ) -> Object

Source

pub fn get_constants( &self, expr: &RynaExpr, consts: &mut FxHashMap<usize, bool>, const_exprs: &mut FxHashMap<usize, RynaExpr>, )

Source

pub fn constant_propagation(&self, body: &mut Vec<RynaExpr>)

Source

pub fn late_optimize(&self, body: &mut Vec<RynaExpr>)

Source§

impl RynaContext

Source

pub fn optimize_instructions(&self, program: &mut Vec<RynaInstruction>)

Source§

impl RynaContext

Source

pub fn parse_and_execute_ryna_module( &mut self, code: &String, ) -> Result<ExecutionInfo, RynaError>

Source

pub fn parse_and_execute_ryna_project_inner<const DEBUG: bool>( path: String, macro_code: Option<String>, force_recompile: bool, optimize: bool, test: bool, program_input: &[String], ) -> Result<ExecutionInfo, RynaError>

Source

pub fn parse_and_execute_ryna_project<const DEBUG: bool>( path: String, force_recompile: bool, optimize: bool, test: bool, program_input: &[String], ) -> Result<ExecutionInfo, RynaError>

Source§

impl RynaContext

Source

pub fn execute_compiled_code<const DEBUG: bool>( &mut self, program: &[CompiledRynaExpr], debug_info: &[DebugInfo], ) -> Result<ExecutionInfo, RynaError>

Source§

impl RynaContext

Source

pub fn get_serializable_module( &self, hash: String, instructions: &[RynaInstruction], ) -> CompiledRynaModule

Trait Implementations§

Source§

impl Clone for RynaContext

Source§

fn clone(&self) -> RynaContext

Returns a duplicate 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 Default for RynaContext

Source§

fn default() -> RynaContext

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

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, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

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, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

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, 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

Source§

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U