Skip to main content

Lang

Enum Lang 

Source
pub enum Lang {
Show 49 variants Number(f32, HelpData), Integer(i32, HelpData), Bool(bool, HelpData), Char(String, HelpData), Union(Box<Lang>, Box<Lang>, HelpData), Scope(Vec<Lang>, HelpData), Function(Vec<ArgumentType>, Type, Box<Lang>, HelpData), Module(String, Vec<Lang>, ModulePosition, Config, HelpData), ModuleDecl(String, HelpData), Variable(String, bool, Type, HelpData), FunctionApp(Box<Lang>, Vec<Lang>, HelpData), VecFunctionApp(Box<Lang>, Vec<Lang>, HelpData), MethodCall(Box<Lang>, Vec<Lang>, Type, HelpData), ArrayIndexing(Box<Lang>, Box<Lang>, HelpData), Let(Box<Lang>, Type, Box<Lang>, HelpData), Alias(Box<Lang>, Vec<Type>, Type, HelpData), Array(Vec<Lang>, HelpData), Record(Vec<ArgumentValue>, HelpData), Tag(String, Box<Lang>, HelpData), If(Box<Lang>, Box<Lang>, Box<Lang>, HelpData), Match(Box<Lang>, Var, Vec<(Type, Box<Lang>)>, HelpData), Tuple(Vec<Lang>, HelpData), Lines(Vec<Lang>, HelpData), Assign(Box<Lang>, Box<Lang>, HelpData), Comment(String, HelpData), ModuleImport(String, HelpData), Import(Type, HelpData), GenFunc(String, String, HelpData), Test(Vec<Lang>, HelpData), Return(Box<Lang>, HelpData), VecBlock(String, HelpData), Lambda(Box<Lang>, HelpData), Library(String, HelpData), Exp(String, HelpData), Signature(Var, Type, HelpData), ForLoop(Var, Box<Lang>, Box<Lang>, HelpData), RFunction(Vec<Lang>, String, HelpData), KeyValue(String, Box<Lang>, HelpData), Vector(Vec<Lang>, HelpData), Sequence(Vec<Lang>, HelpData), Not(Box<Lang>, HelpData), TestBlock(Box<Lang>, HelpData), JSBlock(Box<Lang>, u32, HelpData), Use(Box<Lang>, Box<Lang>, HelpData), Empty(HelpData), WhileLoop(Box<Lang>, Box<Lang>, HelpData), Break(HelpData), Operator(Op, Box<Lang>, Box<Lang>, HelpData), SyntaxErr(Box<Lang>, SyntaxError),
}

Variants§

§

Number(f32, HelpData)

§

Integer(i32, HelpData)

§

Bool(bool, HelpData)

§

Char(String, HelpData)

§

Union(Box<Lang>, Box<Lang>, HelpData)

§

Scope(Vec<Lang>, HelpData)

§

Function(Vec<ArgumentType>, Type, Box<Lang>, HelpData)

§

Module(String, Vec<Lang>, ModulePosition, Config, HelpData)

§

ModuleDecl(String, HelpData)

§

Variable(String, bool, Type, HelpData)

§

FunctionApp(Box<Lang>, Vec<Lang>, HelpData)

§

VecFunctionApp(Box<Lang>, Vec<Lang>, HelpData)

§

MethodCall(Box<Lang>, Vec<Lang>, Type, HelpData)

§

ArrayIndexing(Box<Lang>, Box<Lang>, HelpData)

§

Let(Box<Lang>, Type, Box<Lang>, HelpData)

§

Alias(Box<Lang>, Vec<Type>, Type, HelpData)

§

Array(Vec<Lang>, HelpData)

§

Record(Vec<ArgumentValue>, HelpData)

§

Tag(String, Box<Lang>, HelpData)

§

If(Box<Lang>, Box<Lang>, Box<Lang>, HelpData)

§

Match(Box<Lang>, Var, Vec<(Type, Box<Lang>)>, HelpData)

§

Tuple(Vec<Lang>, HelpData)

§

Lines(Vec<Lang>, HelpData)

§

Assign(Box<Lang>, Box<Lang>, HelpData)

§

Comment(String, HelpData)

§

ModuleImport(String, HelpData)

§

Import(Type, HelpData)

§

GenFunc(String, String, HelpData)

§

Test(Vec<Lang>, HelpData)

§

Return(Box<Lang>, HelpData)

§

VecBlock(String, HelpData)

§

Lambda(Box<Lang>, HelpData)

§

Library(String, HelpData)

§

Exp(String, HelpData)

§

Signature(Var, Type, HelpData)

§

ForLoop(Var, Box<Lang>, Box<Lang>, HelpData)

§

RFunction(Vec<Lang>, String, HelpData)

§

KeyValue(String, Box<Lang>, HelpData)

§

Vector(Vec<Lang>, HelpData)

§

Sequence(Vec<Lang>, HelpData)

§

Not(Box<Lang>, HelpData)

§

TestBlock(Box<Lang>, HelpData)

§

JSBlock(Box<Lang>, u32, HelpData)

§

Use(Box<Lang>, Box<Lang>, HelpData)

§

Empty(HelpData)

§

WhileLoop(Box<Lang>, Box<Lang>, HelpData)

§

Break(HelpData)

§

Operator(Op, Box<Lang>, Box<Lang>, HelpData)

§

SyntaxErr(Box<Lang>, SyntaxError)

Implementations§

Source§

impl Lang

Source

pub fn save_in_memory(&self) -> bool

Source

pub fn to_module(self, name: &str, environment: Environment) -> Self

Source

pub fn to_arg_type(&self) -> Option<ArgumentType>

Source

pub fn extract_types_from_expression(&self, context: &Context) -> Vec<Type>

Source

pub fn is_value(&self) -> bool

Source

pub fn is_undefined(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn infer_var_name(&self, args: &Vec<Lang>, context: &Context) -> Var

Source

pub fn lang_substitution( &self, sub_var: &Lang, var: &Lang, context: &Context, ) -> String

Source

pub fn get_help_data(&self) -> HelpData

Source

pub fn linearize_array(&self) -> Vec<Lang>

Source

pub fn is_r_function(&self) -> bool

Source

pub fn nb_params(&self) -> usize

Source

pub fn simple_print(&self) -> String

Source

pub fn typing(&self, context: &Context) -> TypeContext

Source

pub fn to_js(&self, context: &Context) -> (String, Context)

Source

pub fn to_simple_r(&self, context: &Context) -> (String, Context)

Source

pub fn to_module_member(self) -> Lang

Source

pub fn to_module_helper(self, name: &str) -> Lang

Source

pub fn to_arg_value( self, type_module: &Type, context: &Context, ) -> Option<Vec<ArgumentValue>>

Source

pub fn get_token_type(&self) -> TokenKind

Source

pub fn get_binding_power(&self) -> i32

Source

pub fn get_members_if_array(&self) -> Option<Vec<Lang>>

Source

pub fn len(&self) -> i32

Source

pub fn to_vec(self) -> Vec<Lang>

Trait Implementations§

Source§

impl Clone for Lang

Source§

fn clone(&self) -> Lang

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 Debug for Lang

Source§

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

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

impl Default for Lang

Source§

fn default() -> Lang

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

impl<'de> Deserialize<'de> for Lang

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 Lang

Source§

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

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

impl From<Lang> for HelpData

Source§

fn from(val: Lang) -> Self

Converts to this type from the input type.
Source§

impl From<Lang> for LangToken

Source§

fn from(val: Lang) -> Self

Converts to this type from the input type.
Source§

impl From<LangToken> for Lang

Source§

fn from(val: LangToken) -> Self

Converts to this type from the input type.
Source§

impl From<Var> for Lang

Source§

fn from(val: Var) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Lang

Source§

type Err = ErrorStruct

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Locatable for Lang

Source§

fn get_help_data(&self) -> HelpData

Returns the HelpData attached to this node.
Source§

fn get_file_name_and_text(&self) -> Option<(String, String)>

Returns Some((file_name, source_text)) when the source file is available, None otherwise. Delegates to HelpData::get_file_data.
Source§

impl PartialEq for Lang

Source§

fn eq(&self, other: &Self) -> 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 RTranslatable<(String, Context)> for Box<Lang>

Source§

fn to_r(&self, context: &Context) -> (String, Context)

Source§

impl RTranslatable<(String, Context)> for Lang

Source§

fn to_r(&self, cont: &Context) -> (String, Context)

Source§

impl Serialize for Lang

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 TryFrom<Lang> for ArrayLang

Source§

type Error = String

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

fn try_from(value: Lang) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Lang> for Function

Source§

type Error = ()

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

fn try_from(value: Lang) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Lang> for ModuleLang

Source§

type Error = String

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

fn try_from(value: Lang) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Lang> for Var

Source§

type Error = ()

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

fn try_from(value: Lang) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Lang> for VarFunction

Source§

type Error = String

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

fn try_from(value: Lang) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for Lang

Auto Trait Implementations§

§

impl Freeze for Lang

§

impl RefUnwindSafe for Lang

§

impl Send for Lang

§

impl Sync for Lang

§

impl Unpin for Lang

§

impl UnsafeUnpin for Lang

§

impl UnwindSafe for Lang

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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. 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<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> ToSome for T

Source§

fn to_some(self) -> Option<T>

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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,