diff --git a/.lock b/.lock new file mode 100644 index 00000000..e69de29b diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/Ygen/IR/block/fn.Block.html b/Ygen/IR/block/fn.Block.html new file mode 100644 index 00000000..53d57e34 --- /dev/null +++ b/Ygen/IR/block/fn.Block.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.Block.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/block/struct.Block.html b/Ygen/IR/block/struct.Block.html new file mode 100644 index 00000000..ca615d5f --- /dev/null +++ b/Ygen/IR/block/struct.Block.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.Block.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/builder/fn.IRBuilder.html b/Ygen/IR/builder/fn.IRBuilder.html new file mode 100644 index 00000000..c37d80bc --- /dev/null +++ b/Ygen/IR/builder/fn.IRBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.IRBuilder.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/builder/struct.IRBuilder.html b/Ygen/IR/builder/struct.IRBuilder.html new file mode 100644 index 00000000..6b7ad816 --- /dev/null +++ b/Ygen/IR/builder/struct.IRBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.IRBuilder.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/enum.Type.html b/Ygen/IR/enum.Type.html new file mode 100644 index 00000000..20756f38 --- /dev/null +++ b/Ygen/IR/enum.Type.html @@ -0,0 +1,46 @@ +Type in Ygen::IR - Rust

Enum Ygen::IR::Type

source ·
pub enum Type {
+    u16(u16),
+    u32(u32),
+    u64(u64),
+    i16(i16),
+    i32(i32),
+    i64(i64),
+    Void,
+}
Expand description

Stores a type and a value of that type

+

If you want an empty Type consider using TypeMetadata

+

Variants§

§

u16(u16)

Just an u16 with a value

+
§

u32(u32)

Just an u32 with a value

+
§

u64(u64)

Just an u64 with a value

+
§

i16(i16)

Just an i16 with a value

+
§

i32(i32)

Just an i32 with a value

+
§

i64(i64)

Just an i64 with a value

+
§

Void

Notype

+

Implementations§

source§

impl Type

source

pub fn val(&self) -> u64

Returns the inner value

+

Trait Implementations§

source§

impl BuildAdd<Type, Type> for IRBuilder<'_>

source§

fn BuildAdd(&mut self, op0: Type, op1: Type) -> Var

Adds to values
source§

impl BuildReturn<Type> for IRBuilder<'_>

source§

fn BuildRet(&mut self, val: Type)

Returns specified value
source§

impl Clone for Type

source§

fn clone(&self) -> Type

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 Type

source§

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

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

impl Display for Type

source§

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

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

impl From<Type> for TypeMetadata

source§

fn from(value: Type) -> Self

Converts to this type from the input type.
source§

impl From<TypeMetadata> for Type

source§

fn from(value: TypeMetadata) -> Self

Converts to this type from the input type.
source§

impl Hash for Type

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 Ord for Type

source§

fn cmp(&self, other: &Type) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Type

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Type

source§

fn partial_cmp(&self, other: &Type) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for Type

source§

impl Eq for Type

source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

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
§

impl<Q, K> Comparable<K> for Q
where + Q: Ord + ?Sized, + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/enum.TypeMetadata.html b/Ygen/IR/enum.TypeMetadata.html new file mode 100644 index 00000000..6adf0059 --- /dev/null +++ b/Ygen/IR/enum.TypeMetadata.html @@ -0,0 +1,37 @@ +TypeMetadata in Ygen::IR - Rust

Enum Ygen::IR::TypeMetadata

source ·
pub enum TypeMetadata {
+    u16,
+    u32,
+    u64,
+    i16,
+    i32,
+    i64,
+    Void,
+}
Expand description

Stores type metadata (just the type without data)

+

Variants§

§

u16

u16

+
§

u32

u32

+
§

u64

u64

+
§

i16

i16

+
§

i32

i32

+
§

i64

i64

+
§

Void

Notype

+

Trait Implementations§

source§

impl Clone for TypeMetadata

source§

fn clone(&self) -> TypeMetadata

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 TypeMetadata

source§

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

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

impl Display for TypeMetadata

source§

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

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

impl From<Type> for TypeMetadata

source§

fn from(value: Type) -> Self

Converts to this type from the input type.
source§

impl From<TypeMetadata> for Type

source§

fn from(value: TypeMetadata) -> Self

Converts to this type from the input type.
source§

impl Hash for TypeMetadata

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 TypeMetadata

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for TypeMetadata

source§

impl Eq for TypeMetadata

source§

impl StructuralPartialEq for TypeMetadata

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/enum.VerifyError.html b/Ygen/IR/enum.VerifyError.html new file mode 100644 index 00000000..49ba2307 --- /dev/null +++ b/Ygen/IR/enum.VerifyError.html @@ -0,0 +1,25 @@ +VerifyError in Ygen::IR - Rust

Enum Ygen::IR::VerifyError

source ·
pub enum VerifyError {
+    RetTyNotFnTy(TypeMetadata, TypeMetadata),
+    Op0Op1TyNoMatch(TypeMetadata, TypeMetadata),
+}
Expand description

An error which stores if an ir node is invalid

+

Variants§

§

RetTyNotFnTy(TypeMetadata, TypeMetadata)

The type of the ret node doesn’t match the function return type

+
§

Op0Op1TyNoMatch(TypeMetadata, TypeMetadata)

The type of op0 operand doesn’t match the type of the op1 operand

+

Trait Implementations§

source§

impl Clone for VerifyError

source§

fn clone(&self) -> VerifyError

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 VerifyError

source§

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

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

impl Display for VerifyError

source§

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

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

impl Error for VerifyError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl PartialEq for VerifyError

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for VerifyError

source§

impl Eq for VerifyError

source§

impl StructuralPartialEq for VerifyError

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/fn.Block.html b/Ygen/IR/fn.Block.html new file mode 100644 index 00000000..4bbcf596 --- /dev/null +++ b/Ygen/IR/fn.Block.html @@ -0,0 +1,2 @@ +Block in Ygen::IR - Rust

Function Ygen::IR::Block

source ·
pub fn Block(name: &str, func: &Function) -> Block
Expand description

Creates an new block

+
\ No newline at end of file diff --git a/Ygen/IR/fn.FnTy.html b/Ygen/IR/fn.FnTy.html new file mode 100644 index 00000000..85ab761f --- /dev/null +++ b/Ygen/IR/fn.FnTy.html @@ -0,0 +1,2 @@ +FnTy in Ygen::IR - Rust

Function Ygen::IR::FnTy

source ·
pub fn FnTy(args: Vec<TypeMetadata>, ret: TypeMetadata) -> FunctionType
Expand description

Creates a new function type

+
\ No newline at end of file diff --git a/Ygen/IR/fn.Func.html b/Ygen/IR/fn.Func.html new file mode 100644 index 00000000..456b7bc2 --- /dev/null +++ b/Ygen/IR/fn.Func.html @@ -0,0 +1,2 @@ +Func in Ygen::IR - Rust

Function Ygen::IR::Func

source ·
pub fn Func(name: String, ty: FunctionType) -> Function
Expand description

Creates a new Function

+
\ No newline at end of file diff --git a/Ygen/IR/fn.IRBuilder.html b/Ygen/IR/fn.IRBuilder.html new file mode 100644 index 00000000..1f118af3 --- /dev/null +++ b/Ygen/IR/fn.IRBuilder.html @@ -0,0 +1,2 @@ +IRBuilder in Ygen::IR - Rust

Function Ygen::IR::IRBuilder

source ·
pub fn IRBuilder<'a>() -> IRBuilder<'a>
Expand description

Creates an new IRBuilder

+
\ No newline at end of file diff --git a/Ygen/IR/fn.Module.html b/Ygen/IR/fn.Module.html new file mode 100644 index 00000000..7a6c6f40 --- /dev/null +++ b/Ygen/IR/fn.Module.html @@ -0,0 +1,2 @@ +Module in Ygen::IR - Rust

Function Ygen::IR::Module

source ·
pub fn Module() -> Module
Expand description

Creates a new module

+
\ No newline at end of file diff --git a/Ygen/IR/fn.Var.html b/Ygen/IR/fn.Var.html new file mode 100644 index 00000000..6d5d89ca --- /dev/null +++ b/Ygen/IR/fn.Var.html @@ -0,0 +1,2 @@ +Var in Ygen::IR - Rust

Function Ygen::IR::Var

source ·
pub fn Var(block: &mut Block, ty: TypeMetadata) -> Var
Expand description

Creates a new variable

+
\ No newline at end of file diff --git a/Ygen/IR/func/fn.FnTy.html b/Ygen/IR/func/fn.FnTy.html new file mode 100644 index 00000000..9f4db24b --- /dev/null +++ b/Ygen/IR/func/fn.FnTy.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.FnTy.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/func/fn.Func.html b/Ygen/IR/func/fn.Func.html new file mode 100644 index 00000000..15e84877 --- /dev/null +++ b/Ygen/IR/func/fn.Func.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.Func.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/func/struct.Function.html b/Ygen/IR/func/struct.Function.html new file mode 100644 index 00000000..9e6c212f --- /dev/null +++ b/Ygen/IR/func/struct.Function.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.Function.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/func/struct.FunctionType.html b/Ygen/IR/func/struct.FunctionType.html new file mode 100644 index 00000000..af9131d8 --- /dev/null +++ b/Ygen/IR/func/struct.FunctionType.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.FunctionType.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/index.html b/Ygen/IR/index.html new file mode 100644 index 00000000..a0ea3e04 --- /dev/null +++ b/Ygen/IR/index.html @@ -0,0 +1,2 @@ +Ygen::IR - Rust

Module Ygen::IR

source ·
Expand description

The ir module: functions for building function ir

+

Modules§

  • Stores all ir nodes and the ir trait

Structs§

  • A basic block: stores ir of a specific area of a function
  • A ir function with a known variable and arg size and count
  • Stores the function type
  • IRBuilder: used for building the ir of a function
  • The Module
  • A variable

Enums§

  • Stores a type and a value of that type
  • Stores type metadata (just the type without data)
  • An error which stores if an ir node is invalid

Functions§

  • Creates an new block
  • Creates a new function type
  • Creates a new Function
  • Creates an new IRBuilder
  • Creates a new module
  • Creates a new variable
\ No newline at end of file diff --git a/Ygen/IR/ir/index.html b/Ygen/IR/ir/index.html new file mode 100644 index 00000000..56486656 --- /dev/null +++ b/Ygen/IR/ir/index.html @@ -0,0 +1,6 @@ +Ygen::IR::ir - Rust

Module Ygen::IR::ir

source ·
Expand description

Stores all ir nodes and the ir trait

+

Structs§

Traits§

  • Trait for the return instruction +Used for overloading the CreateRet function +So you can return a TypeConstant or a variable
  • Trait for the return instruction +Used for overloading the CreateRet function +So you can return a TypeConstant or a variable
  • Used for sus workaround to replace current ir node
\ No newline at end of file diff --git a/Ygen/IR/ir/sidebar-items.js b/Ygen/IR/ir/sidebar-items.js new file mode 100644 index 00000000..d84dcf1b --- /dev/null +++ b/Ygen/IR/ir/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Add","ConstAssign"],"trait":["BuildAdd","BuildReturn","Replace"]}; \ No newline at end of file diff --git a/Ygen/IR/ir/struct.Add.html b/Ygen/IR/ir/struct.Add.html new file mode 100644 index 00000000..f2245e2f --- /dev/null +++ b/Ygen/IR/ir/struct.Add.html @@ -0,0 +1,32 @@ +Add in Ygen::IR::ir - Rust

Struct Ygen::IR::ir::Add

source ·
pub struct Add<T, U, Z> { /* private fields */ }
Expand description

An Ir node

+

Implementations§

source§

impl<T, U, Z> Add<T, U, Z>

source

pub fn new(op0: T, op1: U, op2: Z) -> Box<Self>

Creates new instance

+

Trait Implementations§

source§

impl<T: Clone, U: Clone, Z: Clone> Clone for Add<T, U, Z>

source§

fn clone(&self) -> Add<T, U, Z>

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<T: Debug, U: Debug, Z: Debug> Debug for Add<T, U, Z>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, U, Z> Freeze for Add<T, U, Z>
where + T: Freeze, + U: Freeze, + Z: Freeze,

§

impl<T, U, Z> RefUnwindSafe for Add<T, U, Z>
where + T: RefUnwindSafe, + U: RefUnwindSafe, + Z: RefUnwindSafe,

§

impl<T, U, Z> Send for Add<T, U, Z>
where + T: Send, + U: Send, + Z: Send,

§

impl<T, U, Z> Sync for Add<T, U, Z>
where + T: Sync, + U: Sync, + Z: Sync,

§

impl<T, U, Z> Unpin for Add<T, U, Z>
where + T: Unpin, + U: Unpin, + Z: Unpin,

§

impl<T, U, Z> UnwindSafe for Add<T, U, Z>
where + T: UnwindSafe, + U: UnwindSafe, + Z: UnwindSafe,

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

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/ir/struct.ConstAssign.html b/Ygen/IR/ir/struct.ConstAssign.html new file mode 100644 index 00000000..2c711b30 --- /dev/null +++ b/Ygen/IR/ir/struct.ConstAssign.html @@ -0,0 +1,33 @@ +ConstAssign in Ygen::IR::ir - Rust

Struct Ygen::IR::ir::ConstAssign

source ·
pub struct ConstAssign<T, U> {
+    pub inner1: T,
+    pub inner2: U,
+}
Expand description

An Ir node

+

Fields§

§inner1: T

first inner value

+
§inner2: U

second inner value

+

Implementations§

source§

impl<T, U> ConstAssign<T, U>

source

pub fn new(op0: T, op1: U) -> Box<Self>

Creates new instance

+

Trait Implementations§

source§

impl<T: Clone, U: Clone> Clone for ConstAssign<T, U>

source§

fn clone(&self) -> ConstAssign<T, U>

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<T: Debug, U: Debug> Debug for ConstAssign<T, U>

source§

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

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

impl<T: Hash, U: Hash> Hash for ConstAssign<T, U>

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

Auto Trait Implementations§

§

impl<T, U> Freeze for ConstAssign<T, U>
where + T: Freeze, + U: Freeze,

§

impl<T, U> RefUnwindSafe for ConstAssign<T, U>
where + T: RefUnwindSafe, + U: RefUnwindSafe,

§

impl<T, U> Send for ConstAssign<T, U>
where + T: Send, + U: Send,

§

impl<T, U> Sync for ConstAssign<T, U>
where + T: Sync, + U: Sync,

§

impl<T, U> Unpin for ConstAssign<T, U>
where + T: Unpin, + U: Unpin,

§

impl<T, U> UnwindSafe for ConstAssign<T, U>
where + T: UnwindSafe, + U: UnwindSafe,

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

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/ir/trait.BuildAdd.html b/Ygen/IR/ir/trait.BuildAdd.html new file mode 100644 index 00000000..0feca953 --- /dev/null +++ b/Ygen/IR/ir/trait.BuildAdd.html @@ -0,0 +1,8 @@ +BuildAdd in Ygen::IR::ir - Rust

Trait Ygen::IR::ir::BuildAdd

source ·
pub trait BuildAdd<T, U> {
+    // Required method
+    fn BuildAdd(&mut self, op0: T, op1: U) -> Var;
+}
Expand description

Trait for the return instruction +Used for overloading the CreateRet function +So you can return a TypeConstant or a variable

+

Required Methods§

source

fn BuildAdd(&mut self, op0: T, op1: U) -> Var

Adds to values

+

Implementors§

\ No newline at end of file diff --git a/Ygen/IR/ir/trait.BuildReturn.html b/Ygen/IR/ir/trait.BuildReturn.html new file mode 100644 index 00000000..426073cd --- /dev/null +++ b/Ygen/IR/ir/trait.BuildReturn.html @@ -0,0 +1,8 @@ +BuildReturn in Ygen::IR::ir - Rust

Trait Ygen::IR::ir::BuildReturn

source ·
pub trait BuildReturn<T> {
+    // Required method
+    fn BuildRet(&mut self, val: T);
+}
Expand description

Trait for the return instruction +Used for overloading the CreateRet function +So you can return a TypeConstant or a variable

+

Required Methods§

source

fn BuildRet(&mut self, val: T)

Returns specified value

+

Implementors§

\ No newline at end of file diff --git a/Ygen/IR/ir/trait.Replace.html b/Ygen/IR/ir/trait.Replace.html new file mode 100644 index 00000000..ddd300ed --- /dev/null +++ b/Ygen/IR/ir/trait.Replace.html @@ -0,0 +1,6 @@ +Replace in Ygen::IR::ir - Rust

Trait Ygen::IR::ir::Replace

source ·
pub trait Replace<T> {
+    // Required method
+    fn replace(&mut self, other: T);
+}
Expand description

Used for sus workaround to replace current ir node

+

Required Methods§

source

fn replace(&mut self, other: T)

Replaces current ir node

+

Implementations on Foreign Types§

source§

impl Replace<Box<dyn Ir>> for Box<dyn Ir>

source§

fn replace(&mut self, other: Box<dyn Ir>)

Implementors§

\ No newline at end of file diff --git a/Ygen/IR/module/fn.Module.html b/Ygen/IR/module/fn.Module.html new file mode 100644 index 00000000..f2352c8c --- /dev/null +++ b/Ygen/IR/module/fn.Module.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.Module.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/module/struct.Module.html b/Ygen/IR/module/struct.Module.html new file mode 100644 index 00000000..ce50d7df --- /dev/null +++ b/Ygen/IR/module/struct.Module.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.Module.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/sidebar-items.js b/Ygen/IR/sidebar-items.js new file mode 100644 index 00000000..726f875b --- /dev/null +++ b/Ygen/IR/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Type","TypeMetadata","VerifyError"],"fn":["Block","FnTy","Func","IRBuilder","Module","Var"],"mod":["ir"],"struct":["Block","Function","FunctionType","IRBuilder","Module","Var"]}; \ No newline at end of file diff --git a/Ygen/IR/struct.Block.html b/Ygen/IR/struct.Block.html new file mode 100644 index 00000000..26a7f460 --- /dev/null +++ b/Ygen/IR/struct.Block.html @@ -0,0 +1,22 @@ +Block in Ygen::IR - Rust

Struct Ygen::IR::Block

source ·
pub struct Block { /* private fields */ }
Expand description

A basic block: stores ir of a specific area of a function

+

Implementations§

source§

impl Block

source

pub fn new(name: &str, func: &Function) -> Self

Creates a new block

+
source

pub fn dump(&self) -> String

Emits the ir of the block into one string

+
source

pub fn dumpColored(&self) -> String

Emits the ir of the block into one colored string

+
source

pub fn reqVarName(&mut self) -> String

Requests an new variable name - which is the current var index +Also counts up by one

+
source

pub fn verify(&self, func: &Function) -> Result<(), VerifyError>

Verifys if the block and all of its ir nodes are correct:

+
    +
  • Checks if the return type is the actual specified return type of the function
  • +
+

Trait Implementations§

source§

impl Clone for Block

source§

fn clone(&self) -> Block

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 Block

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Block

§

impl !RefUnwindSafe for Block

§

impl !Send for Block

§

impl !Sync for Block

§

impl Unpin for Block

§

impl !UnwindSafe for Block

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

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/struct.Function.html b/Ygen/IR/struct.Function.html new file mode 100644 index 00000000..1c6e9921 --- /dev/null +++ b/Ygen/IR/struct.Function.html @@ -0,0 +1,28 @@ +Function in Ygen::IR - Rust

Struct Ygen::IR::Function

source ·
pub struct Function {
+    pub ty: FunctionType,
+    /* private fields */
+}
Expand description

A ir function with a known variable and arg size and count

+

Fields§

§ty: FunctionType

The function type

+

Implementations§

source§

impl Function

source

pub fn new(name: String, ty: FunctionType) -> Self

Creates a new Function

+
source

pub fn inline(&mut self)

Makes the function inline

+
source

pub fn addBlock(&mut self, name: &str) -> &mut Block

Adds a new block to the function

+
source

pub fn dump(&self) -> String

Emits the Ir of the function into a string

+
source

pub fn dumpColored(&self) -> String

Emits the Ir of the function into an colored string

+
source

pub fn verify(&self) -> Result<(), VerifyError>

Verifys if the function and all of its blocks are correct:

+
    +
  • Checks if the return type is the actual specified return type of the function
  • +
  • Checks all ir nodes
  • +
+
source

pub fn runPassMngr(&mut self, mngr: &PassManager)

Runs the pass manager over all blocks

+

Trait Implementations§

source§

impl Clone for Function

source§

fn clone(&self) -> Function

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 Function

source§

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

Formats the value using the given formatter. 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> 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,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/struct.FunctionType.html b/Ygen/IR/struct.FunctionType.html new file mode 100644 index 00000000..080824d9 --- /dev/null +++ b/Ygen/IR/struct.FunctionType.html @@ -0,0 +1,27 @@ +FunctionType in Ygen::IR - Rust

Struct Ygen::IR::FunctionType

source ·
pub struct FunctionType {
+    pub args: Vec<(usize, TypeMetadata)>,
+    pub ret: TypeMetadata,
+}
Expand description

Stores the function type

+

Fields§

§args: Vec<(usize, TypeMetadata)>

The function arguments (stored as: num, type)

+
§ret: TypeMetadata

The return type

+

Implementations§

source§

impl FunctionType

source

pub fn new(args: Vec<TypeMetadata>, ret: TypeMetadata) -> Self

Creates a new function type

+
source

pub fn arg(&self, num: usize) -> Var

Returns the argument as a var +If the num doesn’t exists, it panics

+

Trait Implementations§

source§

impl Clone for FunctionType

source§

fn clone(&self) -> FunctionType

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 FunctionType

source§

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

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

impl PartialEq for FunctionType

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for FunctionType

source§

impl StructuralPartialEq for FunctionType

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/struct.IRBuilder.html b/Ygen/IR/struct.IRBuilder.html new file mode 100644 index 00000000..9e3b202b --- /dev/null +++ b/Ygen/IR/struct.IRBuilder.html @@ -0,0 +1,15 @@ +IRBuilder in Ygen::IR - Rust

Struct Ygen::IR::IRBuilder

source ·
pub struct IRBuilder<'a> { /* private fields */ }
Expand description

IRBuilder: used for building the ir of a function

+

Implementations§

source§

impl<'a> IRBuilder<'a>

source

pub fn new() -> Self

Creates an new ir builder

+
source

pub fn positionAtEnd(&mut self, block: &'a mut Block)

Positions the block at the end of the blocks list

+
source

pub fn positionAtStart(&mut self, block: &'a mut Block)

Positions the block at the start of the blocks list

+

Trait Implementations§

source§

impl BuildAdd<Type, Type> for IRBuilder<'_>

source§

fn BuildAdd(&mut self, op0: Type, op1: Type) -> Var

Adds to values
source§

impl BuildAdd<Var, Var> for IRBuilder<'_>

source§

fn BuildAdd(&mut self, op0: Var, op1: Var) -> Var

Adds to values
source§

impl BuildReturn<Type> for IRBuilder<'_>

source§

fn BuildRet(&mut self, val: Type)

Returns specified value
source§

impl BuildReturn<Var> for IRBuilder<'_>

source§

fn BuildRet(&mut self, var: Var)

Returns specified value

Auto Trait Implementations§

§

impl<'a> Freeze for IRBuilder<'a>

§

impl<'a> !RefUnwindSafe for IRBuilder<'a>

§

impl<'a> !Send for IRBuilder<'a>

§

impl<'a> !Sync for IRBuilder<'a>

§

impl<'a> Unpin for IRBuilder<'a>

§

impl<'a> !UnwindSafe for IRBuilder<'a>

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/struct.Module.html b/Ygen/IR/struct.Module.html new file mode 100644 index 00000000..cb19c508 --- /dev/null +++ b/Ygen/IR/struct.Module.html @@ -0,0 +1,26 @@ +Module in Ygen::IR - Rust

Struct Ygen::IR::Module

source ·
pub struct Module { /* private fields */ }
Expand description

§The Module

+

The main class for handeling functions

+

Implementations§

source§

impl Module

source

pub fn new() -> Self

Creates a new module

+
source

pub fn add(&mut self, name: &str, ty: &FunctionType) -> &mut Function

Adds a new function to the module

+
source

pub fn dump(&self) -> String

Emits the ir of the entire moudle into one string +Maybe save to an file

+
source

pub fn dumpColored(&self) -> String

Emits the ir of the entire module into a colored string +Maybe output to stdout

+
source

pub fn verify(&self) -> Result<(), VerifyError>

Checks if every function is correct:

+
    +
  • Checks if the return type is the actual specified return type of the function
  • +
  • Checks all ir nodes
  • +
+
source

pub fn runPassMngr(&mut self, mngr: PassManager)

Runs the pass manager over all functions

+

Trait Implementations§

source§

impl Clone for Module

source§

fn clone(&self) -> Module

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 Module

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Module

§

impl !RefUnwindSafe for Module

§

impl !Send for Module

§

impl !Sync for Module

§

impl Unpin for Module

§

impl !UnwindSafe for Module

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

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/struct.Var.html b/Ygen/IR/struct.Var.html new file mode 100644 index 00000000..faa5a168 --- /dev/null +++ b/Ygen/IR/struct.Var.html @@ -0,0 +1,22 @@ +Var in Ygen::IR - Rust

Struct Ygen::IR::Var

source ·
pub struct Var { /* private fields */ }
Expand description

A variable

+

Implementations§

source§

impl Var

source

pub fn new(block: &mut Block, ty: TypeMetadata) -> Self

Creats a new variable

+

Trait Implementations§

source§

impl BuildAdd<Var, Var> for IRBuilder<'_>

source§

fn BuildAdd(&mut self, op0: Var, op1: Var) -> Var

Adds to values
source§

impl BuildReturn<Var> for IRBuilder<'_>

source§

fn BuildRet(&mut self, var: Var)

Returns specified value
source§

impl Clone for Var

source§

fn clone(&self) -> Var

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 Var

source§

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

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

impl Hash for Var

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 Var

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Var

source§

impl StructuralPartialEq for Var

Auto Trait Implementations§

§

impl Freeze for Var

§

impl RefUnwindSafe for Var

§

impl Send for Var

§

impl Sync for Var

§

impl Unpin for Var

§

impl UnwindSafe for Var

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/IR/typ/enum.Type.html b/Ygen/IR/typ/enum.Type.html new file mode 100644 index 00000000..0134b937 --- /dev/null +++ b/Ygen/IR/typ/enum.Type.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/enum.Type.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/typ/enum.TypeMetadata.html b/Ygen/IR/typ/enum.TypeMetadata.html new file mode 100644 index 00000000..1341251b --- /dev/null +++ b/Ygen/IR/typ/enum.TypeMetadata.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/enum.TypeMetadata.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/var/fn.Var.html b/Ygen/IR/var/fn.Var.html new file mode 100644 index 00000000..b7b699f1 --- /dev/null +++ b/Ygen/IR/var/fn.Var.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/fn.Var.html...

+ + + \ No newline at end of file diff --git a/Ygen/IR/var/struct.Var.html b/Ygen/IR/var/struct.Var.html new file mode 100644 index 00000000..f286622d --- /dev/null +++ b/Ygen/IR/var/struct.Var.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/IR/struct.Var.html...

+ + + \ No newline at end of file diff --git a/Ygen/Obj/enum.Decl.html b/Ygen/Obj/enum.Decl.html new file mode 100644 index 00000000..9401dd3a --- /dev/null +++ b/Ygen/Obj/enum.Decl.html @@ -0,0 +1,26 @@ +Decl in Ygen::Obj - Rust

Enum Ygen::Obj::Decl

source ·
pub enum Decl {
+    Function,
+    Data,
+    Constant,
+}
Expand description

A decl to say what’s the label/func

+

Variants§

§

Function

A function

+
§

Data

A mutable data (E.g: a global variable)

+
§

Constant

A constant data

+

Trait Implementations§

source§

impl Clone for Decl

source§

fn clone(&self) -> Decl

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 Decl

source§

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

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

impl PartialEq for Decl

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Decl

source§

impl Eq for Decl

source§

impl StructuralPartialEq for Decl

Auto Trait Implementations§

§

impl Freeze for Decl

§

impl RefUnwindSafe for Decl

§

impl Send for Decl

§

impl Sync for Decl

§

impl Unpin for Decl

§

impl UnwindSafe for Decl

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Obj/enum.Linkage.html b/Ygen/Obj/enum.Linkage.html new file mode 100644 index 00000000..94044610 --- /dev/null +++ b/Ygen/Obj/enum.Linkage.html @@ -0,0 +1,26 @@ +Linkage in Ygen::Obj - Rust

Enum Ygen::Obj::Linkage

source ·
pub enum Linkage {
+    External,
+    Extern,
+    Internal,
+}
Expand description

The linkage of the target symbol

+

Variants§

§

External

Can be seen outside and inside of object file

+
§

Extern

From another object file

+
§

Internal

Only aviable in the object file

+

Trait Implementations§

source§

impl Clone for Linkage

source§

fn clone(&self) -> Linkage

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 Linkage

source§

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

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

impl PartialEq for Linkage

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Linkage

source§

impl Eq for Linkage

source§

impl StructuralPartialEq for Linkage

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Obj/index.html b/Ygen/Obj/index.html new file mode 100644 index 00000000..96466c41 --- /dev/null +++ b/Ygen/Obj/index.html @@ -0,0 +1,3 @@ +Ygen::Obj - Rust

Module Ygen::Obj

source ·
Expand description

Writing/Reading object files

+

Structs§

  • Links from one symbol to another
  • Builds object files. +It also supports debugging information

Enums§

  • A decl to say what’s the label/func
  • The linkage of the target symbol
\ No newline at end of file diff --git a/Ygen/Obj/sidebar-items.js b/Ygen/Obj/sidebar-items.js new file mode 100644 index 00000000..cac442e6 --- /dev/null +++ b/Ygen/Obj/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Decl","Linkage"],"struct":["Link","ObjectBuilder"]}; \ No newline at end of file diff --git a/Ygen/Obj/struct.Link.html b/Ygen/Obj/struct.Link.html new file mode 100644 index 00000000..374a86dc --- /dev/null +++ b/Ygen/Obj/struct.Link.html @@ -0,0 +1,28 @@ +Link in Ygen::Obj - Rust

Struct Ygen::Obj::Link

source ·
pub struct Link {
+    pub from: String,
+    pub to: String,
+    pub at: usize,
+    pub addend: i64,
+}
Expand description

Links from one symbol to another

+

Fields§

§from: String

The link source

+
§to: String

The link destination

+
§at: usize

The binary offset of the start of the function

+
§addend: i64

The addend to use

+

Trait Implementations§

source§

fn clone(&self) -> Link

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§

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

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

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Obj/struct.ObjectBuilder.html b/Ygen/Obj/struct.ObjectBuilder.html new file mode 100644 index 00000000..1de81a53 --- /dev/null +++ b/Ygen/Obj/struct.ObjectBuilder.html @@ -0,0 +1,26 @@ +ObjectBuilder in Ygen::Obj - Rust

Struct Ygen::Obj::ObjectBuilder

source ·
pub struct ObjectBuilder { /* private fields */ }
Expand description

Builds object files. +It also supports debugging information

+

Implementations§

source§

impl ObjectBuilder

source

pub fn new(triple: Triple) -> Self

Creates an new object builder

+
source

pub fn decls(&mut self, decls: Vec<(&str, Decl, Linkage)>)

Sets the decls of the function

+
source

pub fn decl(&mut self, decl: (&str, Decl, Linkage))

Adds one decl to the function

+
source

pub fn define(&mut self, name: &str, data: Vec<u8>)

Defines a symbol

+

Links from one symbol to another

+
source

pub fn emit(&self, file: File) -> Result<(), Box<dyn Error>>

Writes the object file into the the specified file

+

Trait Implementations§

source§

impl Clone for ObjectBuilder

source§

fn clone(&self) -> ObjectBuilder

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 ObjectBuilder

source§

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

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

impl PartialEq for ObjectBuilder

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for ObjectBuilder

source§

impl StructuralPartialEq for ObjectBuilder

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Obj/wrapper/enum.Decl.html b/Ygen/Obj/wrapper/enum.Decl.html new file mode 100644 index 00000000..10af2de2 --- /dev/null +++ b/Ygen/Obj/wrapper/enum.Decl.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Obj/enum.Decl.html...

+ + + \ No newline at end of file diff --git a/Ygen/Obj/wrapper/enum.Linkage.html b/Ygen/Obj/wrapper/enum.Linkage.html new file mode 100644 index 00000000..08b62179 --- /dev/null +++ b/Ygen/Obj/wrapper/enum.Linkage.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Obj/enum.Linkage.html...

+ + + \ No newline at end of file diff --git a/Ygen/Obj/wrapper/struct.Link.html b/Ygen/Obj/wrapper/struct.Link.html new file mode 100644 index 00000000..40d6f23e --- /dev/null +++ b/Ygen/Obj/wrapper/struct.Link.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Obj/struct.Link.html...

+ + + \ No newline at end of file diff --git a/Ygen/Obj/wrapper/struct.ObjectBuilder.html b/Ygen/Obj/wrapper/struct.ObjectBuilder.html new file mode 100644 index 00000000..c4061bcf --- /dev/null +++ b/Ygen/Obj/wrapper/struct.ObjectBuilder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Obj/struct.ObjectBuilder.html...

+ + + \ No newline at end of file diff --git a/Ygen/PassManager/Passes/MathEval/fn.PreComputeValue.html b/Ygen/PassManager/Passes/MathEval/fn.PreComputeValue.html new file mode 100644 index 00000000..06394ef6 --- /dev/null +++ b/Ygen/PassManager/Passes/MathEval/fn.PreComputeValue.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../Ygen/PassManager/Passes/fn.PreComputeValue.html...

+ + + \ No newline at end of file diff --git a/Ygen/PassManager/Passes/MathEval/struct.PreComputeValue.html b/Ygen/PassManager/Passes/MathEval/struct.PreComputeValue.html new file mode 100644 index 00000000..43d0cc02 --- /dev/null +++ b/Ygen/PassManager/Passes/MathEval/struct.PreComputeValue.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../../Ygen/PassManager/Passes/struct.PreComputeValue.html...

+ + + \ No newline at end of file diff --git a/Ygen/PassManager/Passes/fn.PreComputeValue.html b/Ygen/PassManager/Passes/fn.PreComputeValue.html new file mode 100644 index 00000000..2bffae04 --- /dev/null +++ b/Ygen/PassManager/Passes/fn.PreComputeValue.html @@ -0,0 +1,2 @@ +PreComputeValue in Ygen::PassManager::Passes - Rust

Function Ygen::PassManager::Passes::PreComputeValue

source ·
pub fn PreComputeValue() -> Box<PreComputeValue>
Expand description

Creates a new PreComputeValue pass which is heap allocated

+
\ No newline at end of file diff --git a/Ygen/PassManager/Passes/index.html b/Ygen/PassManager/Passes/index.html new file mode 100644 index 00000000..ab9c8ea9 --- /dev/null +++ b/Ygen/PassManager/Passes/index.html @@ -0,0 +1,2 @@ +Ygen::PassManager::Passes - Rust

Module Ygen::PassManager::Passes

source ·
Expand description

all passes

+

Structs§

Functions§

\ No newline at end of file diff --git a/Ygen/PassManager/Passes/sidebar-items.js b/Ygen/PassManager/Passes/sidebar-items.js new file mode 100644 index 00000000..96558c05 --- /dev/null +++ b/Ygen/PassManager/Passes/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["PreComputeValue"],"struct":["PreComputeValue"]}; \ No newline at end of file diff --git a/Ygen/PassManager/Passes/struct.PreComputeValue.html b/Ygen/PassManager/Passes/struct.PreComputeValue.html new file mode 100644 index 00000000..81c9df02 --- /dev/null +++ b/Ygen/PassManager/Passes/struct.PreComputeValue.html @@ -0,0 +1,13 @@ +PreComputeValue in Ygen::PassManager::Passes - Rust

Struct Ygen::PassManager::Passes::PreComputeValue

source ·
pub struct PreComputeValue {}
Expand description

§Pass InlineConstValue

+

Inlines constant values

+

Trait Implementations§

source§

impl Pass for PreComputeValue

source§

fn run(&self, block: &mut Block)

Returns the pass

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/PassManager/index.html b/Ygen/PassManager/index.html new file mode 100644 index 00000000..fd06bde3 --- /dev/null +++ b/Ygen/PassManager/index.html @@ -0,0 +1,6 @@ +Ygen::PassManager - Rust

Module Ygen::PassManager

source ·
Expand description

The pass manager module:

+
    +
  • Includes all passes and their definition
  • +
  • The PassManager
  • +
+

Modules§

Structs§

Traits§

  • The trait all Passes need to implement
\ No newline at end of file diff --git a/Ygen/PassManager/mngr/struct.PassManager.html b/Ygen/PassManager/mngr/struct.PassManager.html new file mode 100644 index 00000000..7155ce39 --- /dev/null +++ b/Ygen/PassManager/mngr/struct.PassManager.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/PassManager/struct.PassManager.html...

+ + + \ No newline at end of file diff --git a/Ygen/PassManager/sidebar-items.js b/Ygen/PassManager/sidebar-items.js new file mode 100644 index 00000000..9db55f72 --- /dev/null +++ b/Ygen/PassManager/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["Passes"],"struct":["PassManager"],"trait":["Pass"]}; \ No newline at end of file diff --git a/Ygen/PassManager/struct.PassManager.html b/Ygen/PassManager/struct.PassManager.html new file mode 100644 index 00000000..64b0c205 --- /dev/null +++ b/Ygen/PassManager/struct.PassManager.html @@ -0,0 +1,16 @@ +PassManager in Ygen::PassManager - Rust

Struct Ygen::PassManager::PassManager

source ·
pub struct PassManager { /* private fields */ }
Expand description

The manager of all passes (PassManager)

+

Implementations§

source§

impl PassManager

source

pub fn new() -> Self

Creates an new pass manager

+
source

pub fn add(&mut self, pass: Box<dyn Pass>)

Adds a new pass to the back of the pass queue

+
source

pub fn addFront(&mut self, pass: Box<dyn Pass>)

Adds a new pass to the front of the pass queue

+
source

pub fn run(&self, block: &mut Block)

Executes the entire pass queue

+

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/PassManager/template/trait.Pass.html b/Ygen/PassManager/template/trait.Pass.html new file mode 100644 index 00000000..bf71f3f5 --- /dev/null +++ b/Ygen/PassManager/template/trait.Pass.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/PassManager/trait.Pass.html...

+ + + \ No newline at end of file diff --git a/Ygen/PassManager/trait.Pass.html b/Ygen/PassManager/trait.Pass.html new file mode 100644 index 00000000..e3de6399 --- /dev/null +++ b/Ygen/PassManager/trait.Pass.html @@ -0,0 +1,6 @@ +Pass in Ygen::PassManager - Rust

Trait Ygen::PassManager::Pass

source ·
pub trait Pass {
+    // Required method
+    fn run(&self, block: &mut Block);
+}
Expand description

The trait all Passes need to implement

+

Required Methods§

source

fn run(&self, block: &mut Block)

Returns the pass

+

Implementors§

\ No newline at end of file diff --git a/Ygen/Support/cli/struct.Cli.html b/Ygen/Support/cli/struct.Cli.html new file mode 100644 index 00000000..b1b7a8b1 --- /dev/null +++ b/Ygen/Support/cli/struct.Cli.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/struct.Cli.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/color/struct.ColorEncoder.html b/Ygen/Support/color/struct.ColorEncoder.html new file mode 100644 index 00000000..d08b5e3c --- /dev/null +++ b/Ygen/Support/color/struct.ColorEncoder.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/struct.ColorEncoder.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/color/trait.Colorize.html b/Ygen/Support/color/trait.Colorize.html new file mode 100644 index 00000000..a25a2447 --- /dev/null +++ b/Ygen/Support/color/trait.Colorize.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/trait.Colorize.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/index.html b/Ygen/Support/index.html new file mode 100644 index 00000000..af9b4597 --- /dev/null +++ b/Ygen/Support/index.html @@ -0,0 +1,10 @@ +Ygen::Support - Rust

Module Ygen::Support

source ·
Expand description

Other utilites like:

+
    +
  • Cli args
  • +
  • String coloring and padding
  • +
+

Structs§

  • A command line parser
  • Colore encoder: +Encodes a string by a specifed format +E.g: Hi I am blueHi I am green +For that use the encode function
  • The Source Manager: easly chars out of a file
  • The token manager

Traits§

  • Clorize trait: Colorizes a string
  • A trait to pad strings
  • Prints the error and exits the process +If no error occured this function just returns
\ No newline at end of file diff --git a/Ygen/Support/pad/trait.Pad.html b/Ygen/Support/pad/trait.Pad.html new file mode 100644 index 00000000..f457406f --- /dev/null +++ b/Ygen/Support/pad/trait.Pad.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/trait.Pad.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/sidebar-items.js b/Ygen/Support/sidebar-items.js new file mode 100644 index 00000000..06f3c661 --- /dev/null +++ b/Ygen/Support/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Cli","ColorEncoder","SrcMngr","TokenMgr"],"trait":["Colorize","Pad","PrintErrorAndExit"]}; \ No newline at end of file diff --git a/Ygen/Support/srcmngr/struct.SrcMngr.html b/Ygen/Support/srcmngr/struct.SrcMngr.html new file mode 100644 index 00000000..567ae61e --- /dev/null +++ b/Ygen/Support/srcmngr/struct.SrcMngr.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/struct.SrcMngr.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/struct.Cli.html b/Ygen/Support/struct.Cli.html new file mode 100644 index 00000000..94a6d205 --- /dev/null +++ b/Ygen/Support/struct.Cli.html @@ -0,0 +1,21 @@ +Cli in Ygen::Support - Rust

Struct Ygen::Support::Cli

source ·
pub struct Cli { /* private fields */ }
Expand description

A command line parser

+

Implementations§

source§

impl Cli

source

pub fn new(name: &str, desc: &str, version: &str, author: &str) -> Self

Creates a new CLI parser

+
source

pub fn add_opt(&mut self, short: &str, long: &str, desc: &str)

Adds an option

+
source

pub fn add_arg(&mut self, short: &str, long: &str, desc: &str, required: bool)

Adds an argument which is seperated by a =

+
source

pub fn version(&self)

Prints the version and description

+
source

pub fn help(&self)

Prints help

+
source

pub fn scan(&mut self)

Scans the arguments

+
source

pub fn opt(&self, name: &str) -> bool

Returns true if option was seen

+
source

pub fn arg(&self, name: &str) -> bool

Returns true if argument was seen

+
source

pub fn arg_val(&self, name: &str) -> Option<String>

Returns the value of the seen argument

+

Auto Trait Implementations§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnwindSafe for Cli

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Support/struct.ColorEncoder.html b/Ygen/Support/struct.ColorEncoder.html new file mode 100644 index 00000000..2d570198 --- /dev/null +++ b/Ygen/Support/struct.ColorEncoder.html @@ -0,0 +1,17 @@ +ColorEncoder in Ygen::Support - Rust

Struct Ygen::Support::ColorEncoder

source ·
pub struct ColorEncoder {}
Expand description

Colore encoder: +Encodes a string by a specifed format +E.g: Hi I am blueHi I am green +For that use the encode function

+

Implementations§

source§

impl ColorEncoder

source

pub fn encode(string: &str) -> String

Encodes a string by a specifed format +E.g: Hi I am blueHi I am gree(crate)n

+

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Support/struct.SrcMngr.html b/Ygen/Support/struct.SrcMngr.html new file mode 100644 index 00000000..3739cf19 --- /dev/null +++ b/Ygen/Support/struct.SrcMngr.html @@ -0,0 +1,28 @@ +SrcMngr in Ygen::Support - Rust

Struct Ygen::Support::SrcMngr

source ·
pub struct SrcMngr { /* private fields */ }
Expand description

The Source Manager: easly chars out of a file

+

Implementations§

source§

impl SrcMngr

source

pub fn new() -> Self

Creats a new SrcMngr

+
source

pub fn register(&mut self, name: String, content: String)

Registers a new file

+
source

pub fn get_next_char( + &mut self, + file: String +) -> Result<Option<char>, SrcMngrError>

Returns the current char in the specified file

+

Also updates the current line and current colum in the file

+
source

pub fn get_cur_pos(&self, file: String) -> Result<(usize, usize), SrcMngrError>

Returns the current position in the specified file

+

returns: Result<(/*line*/usize, /*col*/usize), SrcMngrError>

+

Trait Implementations§

source§

impl Clone for SrcMngr

source§

fn clone(&self) -> SrcMngr

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 SrcMngr

source§

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

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

impl PartialEq for SrcMngr

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for SrcMngr

source§

impl StructuralPartialEq for SrcMngr

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Support/struct.TokenMgr.html b/Ygen/Support/struct.TokenMgr.html new file mode 100644 index 00000000..2e26517f --- /dev/null +++ b/Ygen/Support/struct.TokenMgr.html @@ -0,0 +1,35 @@ +TokenMgr in Ygen::Support - Rust

Struct Ygen::Support::TokenMgr

source ·
pub struct TokenMgr<T> { /* private fields */ }
Expand description

§The token manager

+

You maybe asking for what is this usefull? +It is very useful, for integrating line number information. Which helps by:

+
    +
  • Printing errors in the sematic analasys
  • +
  • Including debug information
  • +
+

§Example

Implementations§

source§

impl<T> TokenMgr<T>

source

pub fn new( + callback: fn(_: &mut SrcMngr) -> Result<Option<(T, usize, Range<usize>)>, Box<dyn Error>> +) -> Self

Creates a new token manager

+
source

pub fn set_backend( + &mut self, + callback: fn(_: &mut SrcMngr) -> Result<Option<(T, usize, Range<usize>)>, Box<dyn Error>> +)

Sets the callback of the TokenMgr which is called for scanning each token +The input function type is like follows: +type TokenMgrCallback<T> = fn(&mut SrcMngr) -> Result<Option<(T, /*line*/usize, /*colums*/Range<usize>)>, Box<dyn Error>>;

+
§! Important Note !
+

The callback only scans one token

+
source

pub fn scan(&mut self, srcMngr: &mut SrcMngr) -> Result<(), Box<dyn Error>>

Scans all tokens of an specific input file

+

Auto Trait Implementations§

§

impl<T> Freeze for TokenMgr<T>

§

impl<T> RefUnwindSafe for TokenMgr<T>
where + T: RefUnwindSafe,

§

impl<T> Send for TokenMgr<T>
where + T: Send,

§

impl<T> Sync for TokenMgr<T>
where + T: Sync,

§

impl<T> Unpin for TokenMgr<T>
where + T: Unpin,

§

impl<T> UnwindSafe for TokenMgr<T>
where + T: UnwindSafe,

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Support/tokmngr/struct.TokenMgr.html b/Ygen/Support/tokmngr/struct.TokenMgr.html new file mode 100644 index 00000000..27d5019b --- /dev/null +++ b/Ygen/Support/tokmngr/struct.TokenMgr.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Support/struct.TokenMgr.html...

+ + + \ No newline at end of file diff --git a/Ygen/Support/trait.Colorize.html b/Ygen/Support/trait.Colorize.html new file mode 100644 index 00000000..23c1459a --- /dev/null +++ b/Ygen/Support/trait.Colorize.html @@ -0,0 +1,52 @@ +Colorize in Ygen::Support - Rust

Trait Ygen::Support::Colorize

source ·
pub trait Colorize {
+
Show 24 methods // Required methods + fn color(&self, r: i16, g: i16, b: i16) -> String; + fn black(&self) -> String; + fn red(&self) -> String; + fn green(&self) -> String; + fn yellow(&self) -> String; + fn blue(&self) -> String; + fn magenta(&self) -> String; + fn cyan(&self) -> String; + fn white(&self) -> String; + fn gray(&self) -> String; + fn bg_color(&self, r: u8, g: u8, b: u8) -> String; + fn bg_black(&self) -> String; + fn bg_red(&self) -> String; + fn bg_green(&self) -> String; + fn bg_yellow(&self) -> String; + fn bg_blue(&self) -> String; + fn bg_magenta(&self) -> String; + fn bg_cyan(&self) -> String; + fn bg_white(&self) -> String; + fn bg_gray(&self) -> String; + fn bold(&self) -> String; + fn italic(&self) -> String; + fn underline(&self) -> String; + fn strike(&self) -> String; +
}
Expand description

Clorize trait: Colorizes a string

+

Required Methods§

source

fn color(&self, r: i16, g: i16, b: i16) -> String

Makes the string to the specified color

+
source

fn black(&self) -> String

Makes the string black

+
source

fn red(&self) -> String

Makes the string red

+
source

fn green(&self) -> String

Makes the string green

+
source

fn yellow(&self) -> String

Makes the string yellow

+
source

fn blue(&self) -> String

Makes the string blue

+
source

fn magenta(&self) -> String

Makes the string magenta

+
source

fn cyan(&self) -> String

Makes the string cyan

+
source

fn white(&self) -> String

Makes the string white

+
source

fn gray(&self) -> String

Makes the string gray

+
source

fn bg_color(&self, r: u8, g: u8, b: u8) -> String

Makes the string to a specified background color

+
source

fn bg_black(&self) -> String

Makes the background of the string black

+
source

fn bg_red(&self) -> String

Makes the background of the string red

+
source

fn bg_green(&self) -> String

Makes the background of the string green

+
source

fn bg_yellow(&self) -> String

Makes the background of the string yellow

+
source

fn bg_blue(&self) -> String

Makes the background of the string blue

+
source

fn bg_magenta(&self) -> String

Makes the background of the string magenta

+
source

fn bg_cyan(&self) -> String

Makes the background of the string cyan

+
source

fn bg_white(&self) -> String

Makes the background of the string white

+
source

fn bg_gray(&self) -> String

Makes the background of the string gray

+
source

fn bold(&self) -> String

Makes the string bold

+
source

fn italic(&self) -> String

Makes the string italitc

+
source

fn underline(&self) -> String

Makes the string underlined

+
source

fn strike(&self) -> String

Makes the string striketrough

+

Implementations on Foreign Types§

source§

impl Colorize for String

source§

fn color(&self, r: i16, g: i16, b: i16) -> String

source§

fn white(&self) -> String

source§

fn black(&self) -> String

source§

fn red(&self) -> String

source§

fn green(&self) -> String

source§

fn yellow(&self) -> String

source§

fn blue(&self) -> String

source§

fn magenta(&self) -> String

source§

fn cyan(&self) -> String

source§

fn gray(&self) -> String

source§

fn bold(&self) -> String

source§

fn italic(&self) -> String

source§

fn underline(&self) -> String

source§

fn strike(&self) -> String

source§

fn bg_color(&self, r: u8, g: u8, b: u8) -> String

source§

fn bg_white(&self) -> String

source§

fn bg_black(&self) -> String

source§

fn bg_red(&self) -> String

source§

fn bg_green(&self) -> String

source§

fn bg_yellow(&self) -> String

source§

fn bg_blue(&self) -> String

source§

fn bg_magenta(&self) -> String

source§

fn bg_cyan(&self) -> String

source§

fn bg_gray(&self) -> String

source§

impl<'a> Colorize for &'a str

source§

fn color(&self, r: i16, g: i16, b: i16) -> String

source§

fn white(&self) -> String

source§

fn black(&self) -> String

source§

fn red(&self) -> String

source§

fn green(&self) -> String

source§

fn yellow(&self) -> String

source§

fn blue(&self) -> String

source§

fn magenta(&self) -> String

source§

fn cyan(&self) -> String

source§

fn gray(&self) -> String

source§

fn bold(&self) -> String

source§

fn italic(&self) -> String

source§

fn underline(&self) -> String

source§

fn strike(&self) -> String

source§

fn bg_color(&self, r: u8, g: u8, b: u8) -> String

source§

fn bg_white(&self) -> String

source§

fn bg_black(&self) -> String

source§

fn bg_red(&self) -> String

source§

fn bg_green(&self) -> String

source§

fn bg_yellow(&self) -> String

source§

fn bg_blue(&self) -> String

source§

fn bg_magenta(&self) -> String

source§

fn bg_cyan(&self) -> String

source§

fn bg_gray(&self) -> String

Implementors§

\ No newline at end of file diff --git a/Ygen/Support/trait.Pad.html b/Ygen/Support/trait.Pad.html new file mode 100644 index 00000000..5d0ce6d1 --- /dev/null +++ b/Ygen/Support/trait.Pad.html @@ -0,0 +1,6 @@ +Pad in Ygen::Support - Rust

Trait Ygen::Support::Pad

source ·
pub trait Pad {
+    // Required method
+    fn pad_to_len(&mut self, len: isize) -> String;
+}
Expand description

A trait to pad strings

+

Required Methods§

source

fn pad_to_len(&mut self, len: isize) -> String

Pads the string to a spicific len (if the input string is longer than the len, the input string will be returned)

+

Implementations on Foreign Types§

source§

impl Pad for String

source§

fn pad_to_len(&mut self, len: isize) -> String

Implementors§

\ No newline at end of file diff --git a/Ygen/Support/trait.PrintErrorAndExit.html b/Ygen/Support/trait.PrintErrorAndExit.html new file mode 100644 index 00000000..953bc8f6 --- /dev/null +++ b/Ygen/Support/trait.PrintErrorAndExit.html @@ -0,0 +1,8 @@ +PrintErrorAndExit in Ygen::Support - Rust

Trait Ygen::Support::PrintErrorAndExit

source ·
pub trait PrintErrorAndExit {
+    // Required method
+    fn print(&self);
+}
Expand description

Prints the error and exits the process +If no error occured this function just returns

+

Required Methods§

source

fn print(&self)

Prints the error and exits the process +If no error occured this function just returns

+

Implementations on Foreign Types§

source§

impl PrintErrorAndExit for Result<(), VerifyError>

source§

fn print(&self)

Implementors§

\ No newline at end of file diff --git a/Ygen/Target/enum.Arch.html b/Ygen/Target/enum.Arch.html new file mode 100644 index 00000000..819ea311 --- /dev/null +++ b/Ygen/Target/enum.Arch.html @@ -0,0 +1,120 @@ +Arch in Ygen::Target - Rust

Enum Ygen::Target::Arch

source ·
pub enum Arch {
+
Show 50 variants Unknown, + Arm, + ArmEB, + Aarch64, + Aarch64BE, + Arc, + Avr, + Bpfel, + Bpfeb, + Hexagon, + Mips, + Mipsel, + Mips64, + Mips64EL, + Msp420, + Ppc, + Ppc64, + Ppc64LE, + R600, + AmdGCN, + Riscv32, + Riscv64, + Sparc, + Sparcv9, + Sparcel, + SystemZ, + Tce, + TceLe, + Thumb, + Thumbeb, + X86, + X86_64, + Xcore, + Nvptx, + Nvptx64, + Le32, + Le64, + AmdIL, + AmdIL64, + Hsail, + Hsail64, + Spir, + Spir64, + Kalimba, + Shave, + Lanai, + Wasm32, + Wasm64, + Renderscript32, + Renderscript64, +
}
Expand description

Target architecture

+

Variants§

§

Unknown

Unknown Architecture

+
§

Arm

Arm

+
§

ArmEB

Arm eb

+
§

Aarch64

Aarch 64

+
§

Aarch64BE

Aarch64_be

+
§

Arc

arc

+
§

Avr

Avr

+
§

Bpfel

Bpfel

+
§

Bpfeb

Bpfeb

+
§

Hexagon

Hexagon

+
§

Mips

Mips

+
§

Mipsel

Mipsel

+
§

Mips64

Mips64

+
§

Mips64EL

Mips64EL

+
§

Msp420

Msp420

+
§

Ppc

Power Pc

+
§

Ppc64

Power PC 64

+
§

Ppc64LE

Power PC 64 Little endian

+
§

R600

R600

+
§

AmdGCN

Amd GCN

+
§

Riscv32

Riscv32

+
§

Riscv64

Riscv64

+
§

Sparc

Sparc

+
§

Sparcv9

Sparc v9

+
§

Sparcel

Sparcel

+
§

SystemZ

SystemZ

+
§

Tce

Tce

+
§

TceLe

Tce le

+
§

Thumb

Thumb

+
§

Thumbeb

Thumb EB

+
§

X86

x86

+
§

X86_64

x86 64Bit

+
§

Xcore

Xcore

+
§

Nvptx

Nvptx

+
§

Nvptx64

Nvptx64

+
§

Le32

Le32

+
§

Le64

Le64

+
§

AmdIL

AmdIL

+
§

AmdIL64

AmdIL64

+
§

Hsail

Hsail

+
§

Hsail64

Hsail64

+
§

Spir

Spir

+
§

Spir64

Spir64

+
§

Kalimba

Kalimba

+
§

Shave

Shave

+
§

Lanai

Lanai

+
§

Wasm32

Wasm32

+
§

Wasm64

Wasm64

+
§

Renderscript32

RenderScript 32

+
§

Renderscript64

RenderScript 64

+

Trait Implementations§

source§

impl Clone for Arch

source§

fn clone(&self) -> Arch

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 Arch

source§

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

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

impl PartialEq for Arch

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Arch

source§

impl Eq for Arch

source§

impl StructuralPartialEq for Arch

Auto Trait Implementations§

§

impl Freeze for Arch

§

impl RefUnwindSafe for Arch

§

impl Send for Arch

§

impl Sync for Arch

§

impl Unpin for Arch

§

impl UnwindSafe for Arch

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/enum.CallConv.html b/Ygen/Target/enum.CallConv.html new file mode 100644 index 00000000..7e12b543 --- /dev/null +++ b/Ygen/Target/enum.CallConv.html @@ -0,0 +1,24 @@ +CallConv in Ygen::Target - Rust

Enum Ygen::Target::CallConv

source ·
pub enum CallConv {
+    WindowsFastCall,
+    SystemV,
+}
Expand description

Target calling convention

+

Variants§

§

WindowsFastCall

Windows standart

+
§

SystemV

Linux standart

+

Trait Implementations§

source§

impl Clone for CallConv

source§

fn clone(&self) -> CallConv

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 CallConv

source§

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

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

impl PartialEq for CallConv

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for CallConv

source§

impl Eq for CallConv

source§

impl StructuralPartialEq for CallConv

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/enum.Environment.html b/Ygen/Target/enum.Environment.html new file mode 100644 index 00000000..95aadec3 --- /dev/null +++ b/Ygen/Target/enum.Environment.html @@ -0,0 +1,58 @@ +Environment in Ygen::Target - Rust

Enum Ygen::Target::Environment

source ·
pub enum Environment {
+
Show 19 variants Unknown, + Gnu, + GnuABIN32, + GnuABI64, + GnuEABI, + GnuEABIHF, + GnuX32, + Code16, + Eabi, + EabiHF, + Android, + Musl, + MuslEABI, + MuslEABIHF, + Msvc, + Itanium, + Cygnus, + CoreCLR, + Simulator, +
}
Expand description

Target environment

+

Variants§

§

Unknown

Unknown environment

+
§

Gnu

Gnu

+
§

GnuABIN32

Gnu ABIN32

+
§

GnuABI64

Gnu ABI64

+
§

GnuEABI

Gnu EABI

+
§

GnuEABIHF

Gnu EABIHF

+
§

GnuX32

Gnu X32

+
§

Code16

Code16

+
§

Eabi

EABI

+
§

EabiHF

EABIHF

+
§

Android

Android

+
§

Musl

Musl

+
§

MuslEABI

Musl EABI

+
§

MuslEABIHF

Musl EABIHF

+
§

Msvc

Msvc

+
§

Itanium

Itanium

+
§

Cygnus

Cygnus

+
§

CoreCLR

Core CLR

+
§

Simulator

Simulator

+

Trait Implementations§

source§

impl Clone for Environment

source§

fn clone(&self) -> Environment

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 Environment

source§

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

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

impl PartialEq for Environment

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Environment

source§

impl Eq for Environment

source§

impl StructuralPartialEq for Environment

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/enum.OS.html b/Ygen/Target/enum.OS.html new file mode 100644 index 00000000..a943ba95 --- /dev/null +++ b/Ygen/Target/enum.OS.html @@ -0,0 +1,90 @@ +OS in Ygen::Target - Rust

Enum Ygen::Target::OS

source ·
pub enum OS {
+
Show 35 variants Unknown, + Ananas, + CloudABI, + Darwin, + DragonFly, + FreeBSD, + Fuchsia, + Ios, + KFreeBSD, + Linux, + Lv2, + MacOS, + NetBSD, + OpenBSD, + Solaris, + Win32, + Haiku, + Minix, + Rtems, + NaCl, + Cnk, + Aix, + Cuda, + Nvcl, + AmdHSA, + Ps4, + ElfIAMCU, + TvOS, + WatchOS, + Mesa3D, + Contiki, + AmdPAL, + HermitCore, + Hurd, + Wasi, +
}
Expand description

Target OS

+

Variants§

§

Unknown

Unknown OS

+
§

Ananas

Ananas

+
§

CloudABI

CloudABI

+
§

Darwin

Darwin

+
§

DragonFly

DragonFly

+
§

FreeBSD

FreeBSD

+
§

Fuchsia

Fuchsia

+
§

Ios

IOS

+
§

KFreeBSD

kFreeBSD

+
§

Linux

Linux

+
§

Lv2

Lv2

+
§

MacOS

MacOS

+
§

NetBSD

NetBSD

+
§

OpenBSD

OpenBSD

+
§

Solaris

Solaris

+
§

Win32

Win32

+
§

Haiku

Haiku

+
§

Minix

Minix

+
§

Rtems

Rtems

+
§

NaCl

NaCl

+
§

Cnk

Cnk

+
§

Aix

Aix

+
§

Cuda

Cuda

+
§

Nvcl

Nvcl

+
§

AmdHSA

AmdHSA

+
§

Ps4

Ps4

+
§

ElfIAMCU

ElfIAMCU

+
§

TvOS

TvOS

+
§

WatchOS

WatchOS

+
§

Mesa3D

Mesa3D

+
§

Contiki

Contiki

+
§

AmdPAL

AmdPAL

+
§

HermitCore

HermitCore

+
§

Hurd

Hurd

+
§

Wasi

Wasi

+

Trait Implementations§

source§

impl Clone for OS

source§

fn clone(&self) -> OS

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 OS

source§

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

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

impl PartialEq for OS

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for OS

source§

impl Eq for OS

source§

impl StructuralPartialEq for OS

Auto Trait Implementations§

§

impl Freeze for OS

§

impl RefUnwindSafe for OS

§

impl Send for OS

§

impl Sync for OS

§

impl Unpin for OS

§

impl UnwindSafe for OS

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/enum.ObjFormat.html b/Ygen/Target/enum.ObjFormat.html new file mode 100644 index 00000000..7686d69f --- /dev/null +++ b/Ygen/Target/enum.ObjFormat.html @@ -0,0 +1,34 @@ +ObjFormat in Ygen::Target - Rust

Enum Ygen::Target::ObjFormat

source ·
pub enum ObjFormat {
+    Unknown,
+    Coff,
+    Elf,
+    MachO,
+    Wasm,
+    XCoff,
+    Default,
+}
Expand description

Target object format

+

Variants§

§

Unknown

Unknown

+
§

Coff

Coff

+
§

Elf

Elf

+
§

MachO

MachO

+
§

Wasm

Wasm

+
§

XCoff

Xcoff

+
§

Default

Platforms default (e.g: Windows -> Coff)

+

Trait Implementations§

source§

impl Clone for ObjFormat

source§

fn clone(&self) -> ObjFormat

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 ObjFormat

source§

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

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

impl PartialEq for ObjFormat

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for ObjFormat

source§

impl Eq for ObjFormat

source§

impl StructuralPartialEq for ObjFormat

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/enum.Vendor.html b/Ygen/Target/enum.Vendor.html new file mode 100644 index 00000000..8b02b98a --- /dev/null +++ b/Ygen/Target/enum.Vendor.html @@ -0,0 +1,52 @@ +Vendor in Ygen::Target - Rust

Enum Ygen::Target::Vendor

source ·
pub enum Vendor {
+
Show 16 variants Unknown, + Apple, + Pc, + Scei, + Bgp, + Freescale, + Ibm, + ImaginationTechnologies, + MipsTechnologies, + Nvidia, + Csr, + Myriad, + Amd, + Mesa, + Suse, + OpenEmbedded, +
}
Expand description

Vendor

+

Variants§

§

Unknown

Unknown Vendor

+
§

Apple

Apple

+
§

Pc

PC

+
§

Scei

Scei

+
§

Bgp

Bgp

+
§

Freescale

Freescale

+
§

Ibm

Ibm

+
§

ImaginationTechnologies

Imagination Technologies

+
§

MipsTechnologies

Mips Technologies

+
§

Nvidia

Nvidia

+
§

Csr

Csr

+
§

Myriad

Myriad

+
§

Amd

Amd

+
§

Mesa

Mesa

+
§

Suse

Suse

+
§

OpenEmbedded

Open Embedded

+

Trait Implementations§

source§

impl Clone for Vendor

source§

fn clone(&self) -> Vendor

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 Vendor

source§

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

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

impl PartialEq for Vendor

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Vendor

source§

impl Eq for Vendor

source§

impl StructuralPartialEq for Vendor

Auto Trait Implementations§

§

impl Freeze for Vendor

§

impl RefUnwindSafe for Vendor

§

impl Send for Vendor

§

impl Sync for Vendor

§

impl Unpin for Vendor

§

impl UnwindSafe for Vendor

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/index.html b/Ygen/Target/index.html new file mode 100644 index 00000000..f2edca2c --- /dev/null +++ b/Ygen/Target/index.html @@ -0,0 +1,6 @@ +Ygen::Target - Rust

Module Ygen::Target

source ·
Expand description

The target module: every stuff which has to do with targets. Like:

+
    +
  • The target triple
  • +
  • TargetRegistry
  • +
+

Structs§

  • The Target Registry: stores if a target was already initialized
  • The target triple

Enums§

\ No newline at end of file diff --git a/Ygen/Target/registry/struct.TargetRegistry.html b/Ygen/Target/registry/struct.TargetRegistry.html new file mode 100644 index 00000000..9eb46513 --- /dev/null +++ b/Ygen/Target/registry/struct.TargetRegistry.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Target/struct.TargetRegistry.html...

+ + + \ No newline at end of file diff --git a/Ygen/Target/sidebar-items.js b/Ygen/Target/sidebar-items.js new file mode 100644 index 00000000..0e4709d9 --- /dev/null +++ b/Ygen/Target/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Arch","CallConv","Environment","OS","ObjFormat","Vendor"],"struct":["TargetRegistry","Triple"]}; \ No newline at end of file diff --git a/Ygen/Target/struct.TargetRegistry.html b/Ygen/Target/struct.TargetRegistry.html new file mode 100644 index 00000000..1dfe059c --- /dev/null +++ b/Ygen/Target/struct.TargetRegistry.html @@ -0,0 +1,21 @@ +TargetRegistry in Ygen::Target - Rust

Struct Ygen::Target::TargetRegistry

source ·
pub struct TargetRegistry { /* private fields */ }
Expand description

The Target Registry: stores if a target was already initialized

+

Implementations§

source§

impl TargetRegistry

source

pub fn new() -> Self

Creates a new instance

+
source

pub fn set_inited(&mut self, arch: Arch)

Sets an architecture as initialized

+

Trait Implementations§

source§

impl Clone for TargetRegistry

source§

fn clone(&self) -> TargetRegistry

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 TargetRegistry

source§

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

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

impl PartialEq for TargetRegistry

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TargetRegistry

source§

impl StructuralPartialEq for TargetRegistry

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/struct.Triple.html b/Ygen/Target/struct.Triple.html new file mode 100644 index 00000000..0d490da6 --- /dev/null +++ b/Ygen/Target/struct.Triple.html @@ -0,0 +1,33 @@ +Triple in Ygen::Target - Rust

Struct Ygen::Target::Triple

source ·
pub struct Triple {
+    pub arch: Arch,
+    pub vendor: Vendor,
+    pub os: OS,
+    pub env: Environment,
+    pub bin: ObjFormat,
+}
Expand description

The target triple

+

Fields§

§arch: Arch

The target architecture to use

+
§vendor: Vendor

The Vendor (If anyone knowns what this is please create an issue or a pr and fix the docs)

+
§os: OS

The target calling convention to use

+
§env: Environment

The runtime environment

+
§bin: ObjFormat

Object format

+

Implementations§

source§

impl Triple

source

pub fn parse(string: &str) -> Result<Triple, TripleError>

Parses the target triple string. +Returns the target triple or TripleError

+
source

pub fn from(value: &str) -> Result<Triple, TripleError>

Just another name for the parse function

+

Trait Implementations§

source§

impl Clone for Triple

source§

fn clone(&self) -> Triple

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 Triple

source§

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

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

impl PartialEq for Triple

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for Triple

source§

impl Eq for Triple

source§

impl StructuralPartialEq for Triple

Auto Trait Implementations§

§

impl Freeze for Triple

§

impl RefUnwindSafe for Triple

§

impl Send for Triple

§

impl Sync for Triple

§

impl Unpin for Triple

§

impl UnwindSafe for Triple

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
§

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

§

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

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

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

§

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> ToOwned for T
where + T: Clone,

§

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

§

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

§

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.
\ No newline at end of file diff --git a/Ygen/Target/triple/struct.Triple.html b/Ygen/Target/triple/struct.Triple.html new file mode 100644 index 00000000..e9111c8c --- /dev/null +++ b/Ygen/Target/triple/struct.Triple.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to ../../../Ygen/Target/struct.Triple.html...

+ + + \ No newline at end of file diff --git a/Ygen/all.html b/Ygen/all.html new file mode 100644 index 00000000..119d7c11 --- /dev/null +++ b/Ygen/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

\ No newline at end of file diff --git a/Ygen/index.html b/Ygen/index.html new file mode 100644 index 00000000..b200e3df --- /dev/null +++ b/Ygen/index.html @@ -0,0 +1,2 @@ +Ygen - Rust

Crate Ygen

source ·
Expand description

Ygen - Yet another Code Generator

+

Modules§

  • The ir module: functions for building function ir
  • Writing/Reading object files
  • The pass manager module:
  • Other utilites like:
  • The target module: every stuff which has to do with targets. Like:
  • Most common used functions, classes, enums of this Libary
\ No newline at end of file diff --git a/Ygen/prelude/index.html b/Ygen/prelude/index.html new file mode 100644 index 00000000..5861db6b --- /dev/null +++ b/Ygen/prelude/index.html @@ -0,0 +1,2 @@ +Ygen::prelude - Rust

Module Ygen::prelude

source ·
Expand description

Most common used functions, classes, enums of this Libary

+

Re-exports§

\ No newline at end of file diff --git a/Ygen/prelude/sidebar-items.js b/Ygen/prelude/sidebar-items.js new file mode 100644 index 00000000..5244ce01 --- /dev/null +++ b/Ygen/prelude/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/Ygen/sidebar-items.js b/Ygen/sidebar-items.js new file mode 100644 index 00000000..0e7c7056 --- /dev/null +++ b/Ygen/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["IR","Obj","PassManager","Support","Target","prelude"]}; \ No newline at end of file diff --git a/crates.js b/crates.js new file mode 100644 index 00000000..7ee3c69d --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["Ygen","ygen_mc"]; \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 00000000..613a5d7f --- /dev/null +++ b/help.html @@ -0,0 +1 @@ +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..748a6730 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ + diff --git a/search-index.js b/search-index.js new file mode 100644 index 00000000..2ca31071 --- /dev/null +++ b/search-index.js @@ -0,0 +1,6 @@ +var searchIndex = new Map(JSON.parse('[\ +["Ygen",{"t":"CCCCCCFHNNNNHHFFFHFHPPGGFHGPPNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPPPPPPNNNNNNNNNNCNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNPPPPPPNNNNFKMMKFKNNNNNNNNNNNNNOONNNNMNNNNNNNNPPGPPPPFGFOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNONNNNNNNNNNNNNNNNKFCNNNNNNNMNNNNFHNNNNNNNNFFKKKFFNNNNMMMMMMMMMMMMMNNNNNNNNNNMMNNNNNNNNNNNNMMNNNNNMMNNNNMMMNNNNMNNNNNNNNNNNNNMNMMPPPPPPPPPPPPPGPPPPPPGPPPPPPPPPPPPPPPPGPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPGGPPPPPPPPPPPPPPPPPPPPPPPPPFPPPPFPPPPPPGPPPPPPPPPPPOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOEEE","n":["IR","Obj","PassManager","Support","Target","prelude","Block","Block","BuildAdd","BuildAdd","BuildRet","BuildRet","FnTy","Func","Function","FunctionType","IRBuilder","IRBuilder","Module","Module","Op0Op1TyNoMatch","RetTyNotFnTy","Type","TypeMetadata","Var","Var","VerifyError","Void","Void","add","addBlock","arg","args","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cmp","compare","dump","dump","dump","dumpColored","dumpColored","dumpColored","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","hash","hash","hash","i16","i16","i32","i32","i64","i64","inline","into","into","into","into","into","into","into","into","into","ir","new","new","new","new","new","new","partial_cmp","positionAtEnd","positionAtStart","reqVarName","ret","runPassMngr","runPassMngr","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","ty","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","u16","u16","u32","u32","u64","u64","val","verify","verify","verify","Add","BuildAdd","BuildAdd","BuildRet","BuildReturn","ConstAssign","Replace","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","fmt","fmt","from","from","hash","inner1","inner2","into","into","new","new","replace","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","Constant","Data","Decl","Extern","External","Function","Internal","Link","Linkage","ObjectBuilder","addend","at","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","decl","decls","define","emit","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","from","from","from","from","from","into","into","into","into","link","new","to","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","Pass","PassManager","Passes","add","addFront","borrow","borrow_mut","from","into","new","run","run","try_from","try_into","type_id","PreComputeValue","PreComputeValue","borrow","borrow_mut","from","into","run","try_from","try_into","type_id","Cli","ColorEncoder","Colorize","Pad","PrintErrorAndExit","SrcMngr","TokenMgr","add_arg","add_opt","arg","arg_val","bg_black","bg_blue","bg_color","bg_cyan","bg_gray","bg_green","bg_magenta","bg_red","bg_white","bg_yellow","black","blue","bold","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","color","cyan","encode","eq","equivalent","equivalent","equivalent","fmt","from","from","from","from","get_cur_pos","get_next_char","gray","green","help","into","into","into","into","italic","magenta","new","new","new","opt","pad_to_len","print","red","register","scan","scan","set_backend","strike","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","underline","version","white","yellow","Aarch64","Aarch64BE","Aix","Amd","AmdGCN","AmdHSA","AmdIL","AmdIL64","AmdPAL","Ananas","Android","Apple","Arc","Arch","Arm","ArmEB","Avr","Bgp","Bpfeb","Bpfel","CallConv","CloudABI","Cnk","Code16","Coff","Contiki","CoreCLR","Csr","Cuda","Cygnus","Darwin","Default","DragonFly","Eabi","EabiHF","Elf","ElfIAMCU","Environment","FreeBSD","Freescale","Fuchsia","Gnu","GnuABI64","GnuABIN32","GnuEABI","GnuEABIHF","GnuX32","Haiku","HermitCore","Hexagon","Hsail","Hsail64","Hurd","Ibm","ImaginationTechnologies","Ios","Itanium","KFreeBSD","Kalimba","Lanai","Le32","Le64","Linux","Lv2","MacOS","MachO","Mesa","Mesa3D","Minix","Mips","Mips64","Mips64EL","MipsTechnologies","Mipsel","Msp420","Msvc","Musl","MuslEABI","MuslEABIHF","Myriad","NaCl","NetBSD","Nvcl","Nvidia","Nvptx","Nvptx64","OS","ObjFormat","OpenBSD","OpenEmbedded","Pc","Ppc","Ppc64","Ppc64LE","Ps4","R600","Renderscript32","Renderscript64","Riscv32","Riscv64","Rtems","Scei","Shave","Simulator","Solaris","Sparc","Sparcel","Sparcv9","Spir","Spir64","Suse","SystemV","SystemZ","TargetRegistry","Tce","TceLe","Thumb","Thumbeb","Triple","TvOS","Unknown","Unknown","Unknown","Unknown","Unknown","Vendor","Wasi","Wasm","Wasm32","Wasm64","WatchOS","Win32","WindowsFastCall","X86","X86_64","XCoff","Xcore","arch","bin","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","env","eq","eq","eq","eq","eq","eq","eq","eq","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","equivalent","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","new","os","parse","set_inited","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vendor","PassManager","PrintErrorAndExit","Triple"],"q":[[0,"Ygen"],[6,"Ygen::IR"],[199,"Ygen::IR::ir"],[234,"Ygen::Obj"],[314,"Ygen::PassManager"],[329,"Ygen::PassManager::Passes"],[339,"Ygen::Support"],[425,"Ygen::Target"],[691,"Ygen::prelude"],[694,"Ygen::IR::func"],[695,"Ygen::IR::block"],[696,"Ygen::IR::builder"],[697,"Ygen::IR::typ"],[698,"Ygen::IR::var"],[699,"alloc::vec"],[700,"alloc::string"],[701,"Ygen::IR::module"],[702,"core::cmp"],[703,"core::fmt"],[704,"core::hash"],[705,"core::option"],[706,"Ygen::PassManager::mngr"],[707,"core::result"],[708,"core::any"],[709,"core::clone"],[710,"alloc::boxed"],[711,"Ygen::Obj::wrapper"],[712,"std::fs"],[713,"core::error"],[714,"Ygen::Target::triple"],[715,"Ygen::PassManager::template"],[716,"Ygen::PassManager::Passes::MathEval"],[717,"Ygen::Support::cli"],[718,"Ygen::Support::color"],[719,"Ygen::Support::srcmngr"],[720,"core::ops::range"],[721,"Ygen::Support::tokmngr"],[722,"Ygen::Support::pad"],[723,"Ygen::Target::registry"]],"i":[0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,5,8,12,2,10,10,4,12,10,2,5,8,3,6,14,4,12,10,2,5,8,3,6,14,12,10,2,5,8,3,6,14,12,10,2,5,8,3,6,14,5,5,12,2,3,12,2,3,10,5,8,6,14,10,10,10,5,5,5,8,8,8,6,6,6,14,14,14,12,10,2,5,5,8,8,3,6,14,14,4,12,10,2,5,5,8,8,3,6,14,5,8,6,5,8,5,8,5,8,2,4,12,10,2,5,8,3,6,14,0,4,12,10,2,3,6,5,4,4,3,10,12,2,12,10,2,5,8,3,6,14,5,8,14,4,12,10,2,5,8,3,6,14,4,12,10,2,5,8,3,6,14,2,4,12,10,2,5,8,3,6,14,5,8,5,8,5,8,5,12,2,3,0,0,25,26,0,0,0,27,29,27,29,27,29,27,29,27,29,27,29,27,27,27,27,29,27,29,33,27,29,27,29,27,29,27,29,34,34,0,36,36,34,36,0,0,0,35,35,34,35,36,37,34,35,36,37,34,35,36,37,34,35,36,37,37,37,37,37,34,35,36,37,34,34,34,35,35,35,36,36,36,37,37,37,34,35,36,37,34,35,36,37,35,34,35,36,37,37,37,35,34,35,36,37,34,35,36,37,34,35,36,37,34,35,36,37,0,0,0,21,21,21,21,21,21,21,43,21,21,21,21,0,0,44,44,44,44,44,44,44,44,0,0,0,0,0,0,0,45,45,45,45,46,46,46,46,46,46,46,46,46,46,46,46,46,64,45,53,47,64,45,53,47,47,47,46,46,64,47,47,47,47,47,64,45,53,47,47,47,46,46,45,64,45,53,47,46,46,45,53,47,45,54,56,46,47,45,53,53,46,47,64,45,53,47,64,45,53,47,64,45,53,47,46,45,46,46,58,58,61,60,58,61,58,58,61,61,62,60,58,0,58,58,58,60,58,58,0,61,61,62,63,61,62,60,61,62,61,63,61,62,62,63,61,0,61,60,61,62,62,62,62,62,62,61,61,58,58,58,61,60,60,61,62,61,58,58,58,58,61,61,61,63,60,61,61,58,58,58,60,58,58,62,62,62,62,60,61,61,61,60,58,58,0,0,61,60,60,58,58,58,61,58,58,58,58,58,61,60,58,62,61,58,58,58,58,58,60,59,58,0,58,58,58,58,0,61,58,60,61,62,63,0,61,63,58,58,61,61,59,58,58,63,58,42,42,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,42,57,58,59,60,61,62,63,42,42,42,57,57,57,58,58,58,59,59,59,60,60,60,61,61,61,62,62,62,63,63,63,42,57,58,59,60,61,62,63,42,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,57,42,42,57,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,57,58,59,60,61,62,63,42,0,0,0],"f":"```````{{bd}f}{{hjj}l}{{hll}l}{{hl}n}{{hj}n}{{{Ab{A`}}A`}Ad}{{AfAd}d}```{{}h}`{{}Ah}`````{{fA`}l}```{{AhbAd}d}{{db}f}{{AdAj}l}`{ce{}{}}00000000000000000{AhAh}{AdAd}{dd}{jj}{A`A`}{ff}{ll}{AlAl}{{ce}n{}{}}0000000{{jj}An}{{ce}An{}{}}{AhAf}{dAf}{fAf}210{{AdAd}B`}{{jj}B`}{{A`A`}B`}{{ll}B`}{{AlAl}B`}{{ce}B`{}{}}00000000000000{{AhBb}Bd}{{AdBb}Bd}{{dBb}Bd}{{jBb}Bd}0{{A`Bb}Bd}0{{fBb}Bd}{{lBb}Bd}{{AlBb}Bd}0{cc{}}000{A`j}11{jA`}222{{jc}nBf}{{A`c}nBf}{{lc}nBf}``````{dn}{ce{}{}}00000000`{{}h}{{}Ah}{{{Ab{A`}}A`}Ad}{{AfAd}d}{{bd}f}{{fA`}l}{{jj}{{Bh{An}}}}{{hf}n}0{fAf}`{{AhBj}n}{{dBj}n};;;;;;;;{cAf{}}00{c{{Bl{e}}}{}{}}00000000000000000`{cBn{}}00000000``````{jC`}{Ah{{Bl{nAl}}}}{d{{Bl{nAl}}}}{{fd}{{Bl{nAl}}}}``{{Cbce}l{}{}}{{Cdc}n{}}```{ce{}{}}000{{{Cf{ce}}}{{Cf{ce}}}ChCh}{{{Cj{ceg}}}{{Cj{ceg}}}ChChCh}{{ce}n{}{}}0{{{Cf{ce}}Bb}BdClCl}{{{Cj{ceg}}Bb}BdClClCl}{cc{}}0{{{Cf{ce}}g}nCnCnBf}``77{{ce}{{D`{{Cf{ce}}}}}{}{}}{{ceg}{{D`{{Cj{ceg}}}}}{}{}{}}{{Dbc}n{}}::{c{{Bl{e}}}{}{}}000{cBn{}}0````````````<<<<<<<<{DdDd}{DfDf}{DhDh}{DjDj}===={{Dj{Dl{bDdDh}}}n}{{Dj{Ab{{Dl{bDdDh}}}}}n}{{Djb{Ab{Dn}}}n}{{DjE`}{{Bl{n{D`{Eb}}}}}}{{DdDd}B`}{{DfDf}B`}{{DhDh}B`}{{DjDj}B`}{{ce}B`{}{}}00000000000{{DdBb}Bd}{{DfBb}Bd}{{DhBb}Bd}{{DjBb}Bd}{cc{}}000`{ce{}{}}000{{DjDf}n}{EdDj}`2222{c{{Bl{e}}}{}{}}0000000{cBn{}}000```{{Bj{D`{Ef}}}n}05565{{}Bj}{{Eff}n}{{Bjf}n}554`{{}{{D`{Eh}}}}99:9{{Ehf}n}776```````{{EjbbbB`}n}{{Ejbbb}n}{{Ejb}B`}{{Ejb}{{Bh{Af}}}}{ElAf}0{{ElDnDnDn}Af}1111111111{ce{}{}}0000000{EnEn}{{ce}n{}{}}{{ElF`F`F`}Af}5{bAf}{{EnEn}B`}{{ce}B`{}{}}00{{EnBb}Bd}{cc{}}000{{EnAf}{{Bl{{Dl{AjAj}}`}}}}{{EnAf}{{Bl{{Bh{Fb}}`}}}}<<{Ejn};;;;=={{bbbb}Ej}{{{Fh{En}{{Fd{{Bl{{Bh{{Dl{cAj{Ff{Aj}}}}}}{D`{Eb}}}}}}}}}{{Fj{c}}}{}}{{}En}{{Ejb}B`}{{FlFn}Af}{G`n}{ElAf}{{EnAfAf}n}8{{{Fj{c}}En}{{Bl{n{D`{Eb}}}}}{}}{{{Fj{c}}{Fh{En}{{Fd{{Bl{{Bh{{Dl{cAj{Ff{Aj}}}}}}{D`{Eb}}}}}}}}}n{}}3{ce{}{}}{c{{Bl{e}}}{}{}}0000000{cBn{}}0006=66```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````2222222222222222{EdEd}{GbGb}{GdGd}{GfGf}{GhGh}{GjGj}{GlGl}{GnGn}{{ce}n{}{}}0000000`{{EdEd}B`}{{GbGb}B`}{{GdGd}B`}{{GfGf}B`}{{GhGh}B`}{{GjGj}B`}{{GlGl}B`}{{GnGn}B`}{{ce}B`{}{}}00000000000000000000000{{EdBb}Bd}{{GbBb}Bd}{{GdBb}Bd}{{GfBb}Bd}{{GhBb}Bd}{{GjBb}Bd}{{GlBb}Bd}{{GnBb}Bd}{b{{Bl{Ed`}}}}{cc{}}0000000{ce{}{}}0000000{{}Gb}`3{{GbGd}n}22222222{c{{Bl{e}}}{}{}}000000000000000{cBn{}}0000000````","D":"BMf","p":[[1,"str"],[5,"Function",6,694],[5,"Block",6,695],[5,"IRBuilder",6,696],[6,"Type",6,697],[5,"Var",6,698],[1,"unit"],[6,"TypeMetadata",6,697],[5,"Vec",699],[5,"FunctionType",6,694],[5,"String",700],[5,"Module",6,701],[1,"usize"],[6,"VerifyError",6],[6,"Ordering",702],[1,"bool"],[5,"Formatter",703],[8,"Result",703],[10,"Hasher",704],[6,"Option",705],[5,"PassManager",314,706],[6,"Result",707],[5,"TypeId",708],[1,"u64"],[10,"BuildAdd",199],[10,"BuildReturn",199],[5,"ConstAssign",199],[10,"Clone",709],[5,"Add",199],[10,"Debug",703],[10,"Hash",704],[5,"Box",710],[10,"Replace",199],[6,"Decl",234,711],[5,"Link",234,711],[6,"Linkage",234,711],[5,"ObjectBuilder",234,711],[1,"tuple"],[1,"u8"],[5,"File",712],[10,"Error",713],[5,"Triple",425,714],[10,"Pass",314,715],[5,"PreComputeValue",329,716],[5,"Cli",339,717],[10,"Colorize",339,718],[5,"SrcMngr",339,719],[1,"i16"],[1,"char"],[17,"Output"],[5,"Range",720],[1,"fn"],[5,"TokenMgr",339,721],[10,"Pad",339,722],[1,"isize"],[10,"PrintErrorAndExit",339],[5,"TargetRegistry",425,723],[6,"Arch",425],[6,"CallConv",425],[6,"Vendor",425],[6,"OS",425],[6,"Environment",425],[6,"ObjFormat",425],[5,"ColorEncoder",339]],"r":[[6,695],[7,695],[12,694],[13,694],[14,694],[15,694],[16,696],[17,696],[18,701],[19,701],[22,697],[23,697],[24,698],[25,698],[236,711],[241,711],[242,711],[243,711],[314,715],[315,706],[329,716],[330,716],[339,717],[340,718],[341,718],[342,722],[344,719],[345,721],[538,723],[543,714],[691,706],[692,339],[693,714]],"b":[[8,"impl-BuildAdd%3CType,+Type%3E-for-IRBuilder%3C\'_%3E"],[9,"impl-BuildAdd%3CVar,+Var%3E-for-IRBuilder%3C\'_%3E"],[10,"impl-BuildReturn%3CVar%3E-for-IRBuilder%3C\'_%3E"],[11,"impl-BuildReturn%3CType%3E-for-IRBuilder%3C\'_%3E"],[98,"impl-Debug-for-Type"],[99,"impl-Display-for-Type"],[100,"impl-Debug-for-TypeMetadata"],[101,"impl-Display-for-TypeMetadata"],[104,"impl-Debug-for-VerifyError"],[105,"impl-Display-for-VerifyError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAEsBGgAJAAMAIgAjAEwAHgBvAAAAcgAAAHYAAgCQAAAAlwAcALUACADPAAkA2wAAAOMABwD3AA8ACwETACsBDwBAAQEARwECAEwBAQBQAQMAbAEJAHkBBACZAQwANQIfAFYCJwCTAh8AtAICAA=="}],\ +["ygen_mc",{"t":"H","n":["main"],"q":[[0,"ygen_mc"]],"i":[0],"f":"{{}b}","D":"`","p":[[1,"unit"]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAEAAAAAAAEAEAAAAAAAAQA="}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/search.desc/Ygen/Ygen-desc-0-.js b/search.desc/Ygen/Ygen-desc-0-.js new file mode 100644 index 00000000..7588ea8a --- /dev/null +++ b/search.desc/Ygen/Ygen-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("Ygen", 0, "Ygen - Yet another Code Generator\nThe ir module: functions for building function ir\nWriting/Reading object files\nThe pass manager module:\nOther utilites like:\nThe target module: every stuff which has to do with …\nMost common used functions, classes, enums of this Libary\nA basic block: stores ir of a specific area of a function\nCreates an new block\nCreates a new function type\nCreates a new Function\nA ir function with a known variable and arg size and count\nStores the function type\nIRBuilder: used for building the ir of a function\nCreates an new IRBuilder\nThe Module\nCreates a new module\nThe type of op0 operand doesn’t match the type of the …\nThe type of the ret node doesn’t match the function …\nStores a type and a value of that type\nStores type metadata (just the type without data)\nA variable\nCreates a new variable\nAn error which stores if an ir node is invalid\nNotype\nNotype\nAdds a new function to the module\nAdds a new block to the function\nReturns the argument as a var If the num doesn’t exists, …\nThe function arguments (stored as: num, type)\nEmits the ir of the entire moudle into one string Maybe …\nEmits the Ir of the function into a string\nEmits the ir of the block into one string\nEmits the ir of the entire module into a colored string …\nEmits the Ir of the function into an colored string\nEmits the ir of the block into one colored string\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nJust an i16 with a value\ni16\nJust an i32 with a value\ni32\nJust an i64 with a value\ni64\nMakes the function inline\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nStores all ir nodes and the ir trait\nCreates an new ir builder\nCreates a new module\nCreates a new function type\nCreates a new Function\nCreates a new block\nCreats a new variable\nPositions the block at the end of the blocks list\nPositions the block at the start of the blocks list\nRequests an new variable name - which is the current var …\nThe return type\nRuns the pass manager over all functions\nRuns the pass manager over all blocks\nThe function type\nJust an u16 with a value\nu16\nJust an u32 with a value\nu32\nJust an u64 with a value\nu64\nReturns the inner value\nChecks if every function is correct:\nVerifys if the function and all of its blocks are correct:\nVerifys if the block and all of its ir nodes are correct:\nAn Ir node\nTrait for the return instruction Used for overloading the …\nAdds to values\nReturns specified value\nTrait for the return instruction Used for overloading the …\nAn Ir node\nUsed for sus workaround to replace current ir node\nReturns the argument unchanged.\nReturns the argument unchanged.\nfirst inner value\nsecond inner value\nCalls U::from(self).\nCalls U::from(self).\nCreates new instance\nCreates new instance\nReplaces current ir node\nA constant data\nA mutable data (E.g: a global variable)\nA decl to say what’s the label/func\nFrom another object file\nCan be seen outside and inside of object file\nA function\nOnly aviable in the object file\nLinks from one symbol to another\nThe linkage of the target symbol\nBuilds object files. It also supports debugging information\nThe addend to use\nThe binary offset of the start of the function\nAdds one decl to the function\nSets the decls of the function\nDefines a symbol\nWrites the object file into the the specified file\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nThe link source\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLinks from one symbol to another\nCreates an new object builder\nThe link destination\nThe trait all Passes need to implement\nThe manager of all passes (PassManager)\nall passes\nAdds a new pass to the back of the pass queue\nAdds a new pass to the front of the pass queue\nReturns the argument unchanged.\nCalls U::from(self).\nCreates an new pass manager\nReturns the pass\nExecutes the entire pass queue\nPass InlineConstValue \nCreates a new PreComputeValue pass which is heap allocated\nReturns the argument unchanged.\nCalls U::from(self).\nA command line parser\nColore encoder: Encodes a string by a specifed format E.g: …\nClorize trait: Colorizes a string\nA trait to pad strings\nPrints the error and exits the process If no error occured …\nThe Source Manager: easly chars out of a file \nThe token manager\nAdds an argument which is seperated by a =\nAdds an option\nReturns true if argument was seen\nReturns the value of the seen argument\nMakes the background of the string black\nMakes the background of the string blue\nMakes the string to a specified background color\nMakes the background of the string cyan\nMakes the background of the string gray\nMakes the background of the string green\nMakes the background of the string magenta\nMakes the background of the string red\nMakes the background of the string white\nMakes the background of the string yellow\nMakes the string black\nMakes the string blue\nMakes the string bold\nMakes the string to the specified color\nMakes the string cyan\nEncodes a string by a specifed format E.g: Hi I am blueHi …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the current position in the specified file\nReturns the current char in the specified file\nMakes the string gray\nMakes the string green\nPrints help\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nMakes the string italitc\nMakes the string magenta\nCreates a new CLI parser\nCreates a new token manager\nCreats a new SrcMngr\nReturns true if option was seen\nPads the string to a spicific len (if the input string is …\nPrints the error and exits the process If no error occured …\nMakes the string red\nRegisters a new file\nScans the arguments\nScans all tokens of an specific input file\nSets the callback of the TokenMgr which is called for …\nMakes the string striketrough\nMakes the string underlined\nPrints the version and description\nMakes the string white\nMakes the string yellow\nAarch 64\nAarch64_be\nAix\nAmd\nAmd GCN\nAmdHSA\nAmdIL\nAmdIL64\nAmdPAL\nAnanas\nAndroid\nApple\narc\nTarget architecture\nArm\nArm eb\nAvr\nBgp\nBpfeb\nBpfel\nTarget calling convention\nCloudABI\nCnk\nCode16\nCoff\nContiki\nCore CLR\nCsr\nCuda\nCygnus\nDarwin\nPlatforms default (e.g: Windows -> Coff)\nDragonFly\nEABI\nEABIHF\nElf\nElfIAMCU\nTarget environment\nFreeBSD\nFreescale\nFuchsia\nGnu\nGnu ABI64\nGnu ABIN32\nGnu EABI\nGnu EABIHF\nGnu X32\nHaiku\nHermitCore\nHexagon\nHsail\nHsail64\nHurd\nIbm\nImagination Technologies\nIOS\nItanium\nkFreeBSD\nKalimba\nLanai\nLe32\nLe64\nLinux\nLv2\nMacOS\nMachO\nMesa\nMesa3D\nMinix\nMips\nMips64\nMips64EL\nMips Technologies\nMipsel\nMsp420\nMsvc\nMusl\nMusl EABI\nMusl EABIHF\nMyriad\nNaCl\nNetBSD\nNvcl\nNvidia\nNvptx\nNvptx64\nTarget OS \nTarget object format\nOpenBSD\nOpen Embedded\nPC\nPower Pc\nPower PC 64\nPower PC 64 Little endian\nPs4\nR600\nRenderScript 32\nRenderScript 64\nRiscv32\nRiscv64\nRtems\nScei\nShave\nSimulator\nSolaris\nSparc\nSparcel\nSparc v9\nSpir\nSpir64\nSuse\nLinux standart\nSystemZ\nThe Target Registry: stores if a target was already …\nTce\nTce le\nThumb\nThumb EB\nThe target triple\nTvOS\nUnknown Architecture\nUnknown Vendor\nUnknown OS\nUnknown environment\nUnknown \nVendor\nWasi\nWasm\nWasm32\nWasm64\nWatchOS\nWin32\nWindows standart\nx86\nx86 64Bit\nXcoff\nXcore\nThe target architecture to use\nObject format\nThe runtime environment\nJust another name for the parse function\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreates a new instance\nThe target calling convention to use\nParses the target triple string. Returns the target …\nSets an architecture as initialized\nThe Vendor (If anyone knowns what this is please create an …") \ No newline at end of file diff --git a/search.desc/ygen_mc/ygen_mc-desc-0-.js b/search.desc/ygen_mc/ygen_mc-desc-0-.js new file mode 100644 index 00000000..bea1fded --- /dev/null +++ b/search.desc/ygen_mc/ygen_mc-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("ygen_mc", 0, "") \ No newline at end of file diff --git a/settings.html b/settings.html new file mode 100644 index 00000000..34c36cfc --- /dev/null +++ b/settings.html @@ -0,0 +1 @@ +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 00000000..bf21134e --- /dev/null +++ b/src-files.js @@ -0,0 +1,5 @@ +var srcIndex = new Map(JSON.parse('[\ +["Ygen",["",[["IR",[],["block.rs","builder.rs","func.rs","ir.rs","mod.rs","module.rs","typ.rs","var.rs"]],["Obj",[],["mod.rs","wrapper.rs"]],["PassManager",[["Passes",[],["MathEval.rs","mod.rs"]]],["mngr.rs","mod.rs","template.rs"]],["Support",[],["cli.rs","color.rs","mod.rs","pad.rs","srcmngr.rs","tokmngr.rs"]],["Target",[],["mod.rs","registry.rs","triple.rs"]]],["lib.rs"]]],\ +["ygen_mc",["",[],["main.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/src/Ygen/IR/block.rs.html b/src/Ygen/IR/block.rs.html new file mode 100644 index 00000000..7ea8f90f --- /dev/null +++ b/src/Ygen/IR/block.rs.html @@ -0,0 +1,156 @@ +block.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
use crate::Support::Colorize;
+
+use super::{ir::Ir, Function, VerifyError};
+
+#[derive(Debug, Clone)]
+/// A basic block: stores ir of a specific area of a function
+pub struct Block {
+    //pub(crate) func: Function,
+    pub(crate) name: String,
+    pub(crate) nodes: Vec<Box<dyn Ir>>,
+    varCount: usize,
+}
+
+impl Block {
+    /// Creates a new block
+    pub fn new(name: &str, func: &Function) -> Self {
+        Self {
+            //func: func.clone(),
+            name: name.to_string(),
+            nodes: vec![],
+            varCount: func.ty.args.len(),
+        }
+    }
+
+    /// Emits the ir of the block into one string
+    pub fn dump(&self) -> String {
+        let mut dump = String::new();
+
+        dump += &format!("{}:\n", self.name);
+
+        for node in &self.nodes {
+            dump += &format!("\t{}\n", node.dump());
+        }
+
+        dump
+    }
+
+    pub(crate) fn push_ir(&mut self, ir: Box<dyn Ir>) {
+        self.nodes.push( ir );
+    }
+
+    /// Emits the ir of the block into one colored string
+    pub fn dumpColored(&self) -> String {
+        let mut dump = String::new();
+
+        dump += &format!("{}:\n", self.name.cyan());
+
+        for node in &self.nodes {
+            dump += &format!("    {}\n", node.dumpColored());
+        }
+
+        dump
+    }
+
+    /// Requests an new variable name - which is the current var index
+    /// Also counts up by one
+    pub fn reqVarName(&mut self) -> String {
+        let num = self.varCount;
+        self.varCount += 1; 
+
+        num.to_string()
+    }
+
+    /// Verifys if the block and all of its ir nodes are correct:
+    ///  * Checks if the return type is the actual specified return type of the function
+    pub fn verify(&self, func: &Function) -> Result<(), VerifyError> {
+        for node in &self.nodes {
+            node.verify(func.ty.clone())?;
+        }
+
+        Ok(())
+    }
+}
+
+/// Creates an new block
+pub fn Block(name: &str, func: &Function) -> Block {
+    Block::new(name, func)
+}
\ No newline at end of file diff --git a/src/Ygen/IR/builder.rs.html b/src/Ygen/IR/builder.rs.html new file mode 100644 index 00000000..cdb99fb2 --- /dev/null +++ b/src/Ygen/IR/builder.rs.html @@ -0,0 +1,74 @@ +builder.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
use std::collections::VecDeque;
+
+use super::Block;
+
+/// IRBuilder: used for building the ir of a function
+pub struct IRBuilder<'a> {
+    pub(crate)  blocks: VecDeque<&'a mut Block>,
+    /// The current block as an index in the blocks list
+    pub(crate)  curr: usize,
+}
+
+impl<'a> IRBuilder<'a> {
+    /// Creates an new ir builder
+    pub fn new() -> Self {
+        Self {
+            blocks: VecDeque::new(),
+            curr: 0,
+        }
+    }
+
+    /// Positions the block at the end of the blocks list
+    pub fn positionAtEnd(&mut self, block: &'a mut Block) {
+        self.blocks.push_back(block);
+        self.curr = self.blocks.len() - 1; // Can cause an intenger underflow but shouldn't
+    }
+
+    /// Positions the block at the start of the blocks list
+    pub fn positionAtStart(&mut self, block: &'a mut Block) {
+        self.blocks.push_front(block);
+        self.curr = 0; // Can cause an intenger underflow but shouldn't
+    }
+}
+
+/// Creates an new IRBuilder
+pub fn IRBuilder<'a>() -> IRBuilder<'a> {
+    IRBuilder::new()
+}
\ No newline at end of file diff --git a/src/Ygen/IR/func.rs.html b/src/Ygen/IR/func.rs.html new file mode 100644 index 00000000..5a5b44cc --- /dev/null +++ b/src/Ygen/IR/func.rs.html @@ -0,0 +1,328 @@ +func.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+
use std::collections::VecDeque;
+
+use super::Block;
+use super::TypeMetadata;
+use super::Var;
+use super::VerifyError;
+use crate::prelude::PassManager;
+use crate::Support::Colorize;
+
+/// Stores the function type
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct FunctionType {
+    /// The function arguments (stored as: num, type)
+    pub args: Vec<(/*num*/usize, TypeMetadata)>,
+    /// The return type
+    pub ret: TypeMetadata,
+}
+
+impl FunctionType {
+    /// Creates a new function type
+    pub fn new(args: Vec<TypeMetadata>, ret: TypeMetadata) -> Self {
+        Self {
+            args: {
+                let mut ret = vec![];
+
+                let mut index = 0;
+                for arg in args {
+
+                    ret.push((index, arg));
+
+                    index += 1;
+                }
+                ret
+            },
+            ret: ret,
+        }
+    }
+
+    /// Returns the argument as a var
+    /// If the num doesn't exists, it panics
+    pub fn arg(&self, num: usize) -> Var {
+        for (n, meta) in &self.args {
+            if *n == num {
+                return Var { name: format!("%{}", n), ty: *meta }
+            }
+        }
+
+        todo!("display error that var doesn't exists")
+    }
+}
+
+/// A ir function with a known variable and arg size and count
+#[derive(Debug, Clone)]
+pub struct Function {
+    /// The function type
+    pub ty: FunctionType,
+
+    pub(crate) name: String,
+    
+    pub(crate) inline: bool,
+    pub(crate) blocks: VecDeque<Block>,
+}
+
+impl Function {
+    /// Creates a new Function
+    pub fn new(name: String, ty: FunctionType) -> Self {
+        Self {
+            ty: ty,
+
+            blocks: VecDeque::new(),
+
+            name: name,
+            inline: false,
+        }
+    }
+
+    /// Makes the function inline
+    pub fn inline(&mut self) {
+        self.inline = true;
+    }
+
+    /// Adds a new block to the function
+    pub fn addBlock(&mut self, name: &str) -> &mut Block {
+        self.blocks.push_back(Block::new(name, &self));
+        self.blocks.back_mut().expect("unreachable") // we previusly pushed something so here it is safe
+    }
+
+    /// Emits the Ir of the function into a string
+    pub fn dump(&self) -> String {
+        let mut string = String::new();
+
+        string += &format!("define {} @{}({}) {{\n", self.ty.ret, self.name, {
+            let mut fmt = String::new();
+
+            for (name, metadata) in &self.ty.args {
+                fmt += &format!("{} %{},", metadata, name);
+            }
+
+            fmt
+        });
+
+        for block in &self.blocks {
+            string += &format!(" {}\n", block.dump());
+        }
+
+        string += "}";
+
+        string
+    }
+
+    /// Emits the Ir of the function into an colored string
+    pub fn dumpColored(&self) -> String {
+        let mut string = String::new();
+
+        string += &format!("{} {} @{}({}) {{\n", "define".blue(), self.ty.ret.to_string().green(), self.name.cyan(), {
+            let mut fmt = String::new();
+
+            for (name, metadata) in &self.ty.args {
+                fmt += &format!(" {} {}, ", metadata.to_string().cyan(), format!("%{}", name).magenta());
+            }
+            if self.ty.args.len() != 0 {
+                fmt.remove(fmt.len() - 2); // The last comma
+            }
+
+            fmt
+        });
+
+        for block in &self.blocks {
+            string += &format!(" {}\n", block.dumpColored());
+        }
+
+        string += "}";
+
+        string
+    }
+
+    /// Verifys if the function and all of its blocks are correct:
+    ///  * Checks if the return type is the actual specified return type of the function
+    ///  * Checks all ir nodes
+    pub fn verify(&self) -> Result<(), VerifyError> {
+        for block in &self.blocks {
+            block.verify(self)?
+        }
+
+        Ok(())
+    }
+    
+    /// Runs the pass manager over all blocks
+    pub fn runPassMngr(&mut self, mngr: &PassManager) {
+        for block in &mut self.blocks {
+            mngr.run(block);
+        }
+    }
+}
+
+/// Creates a new function type
+pub fn FnTy(args: Vec<TypeMetadata>, ret: TypeMetadata) -> FunctionType {
+    FunctionType::new(args, ret)
+}
+
+/// Creates a new Function
+pub fn Func(name: String, ty: FunctionType) -> Function {
+    Function::new(name, ty)
+}
\ No newline at end of file diff --git a/src/Ygen/IR/ir.rs.html b/src/Ygen/IR/ir.rs.html new file mode 100644 index 00000000..adc662fe --- /dev/null +++ b/src/Ygen/IR/ir.rs.html @@ -0,0 +1,760 @@ +ir.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+
use std::{any::Any, fmt::Debug, hash::Hash};
+use super::{FunctionType, IRBuilder, Type, TypeMetadata, Var, VerifyError};
+
+macro_rules! IrTypeWith3 {
+    ($name:tt, $param1:tt, $param2:tt, $param3:tt) => {
+        /// An Ir node
+        #[derive(Debug, Clone)]
+        pub struct $name<$param1, $param2, $param3> {
+            /// first inner value
+            pub(crate) inner1: $param1,
+            /// second inner value
+            pub(crate) inner2: $param2,
+            /// third inner value
+            pub(crate) inner3: $param3,
+        }
+
+
+        impl<$param1, $param2, $param3> $name<$param1, $param2, $param3> {
+            /// Creates new instance
+            #[allow(dead_code)]
+            pub fn new(op0: $param1, op1: $param2, op2: $param3) -> Box<Self> {
+                Box::from(
+                    Self {
+                        inner1: op0,
+                        inner2: op1,
+                        inner3: op2,
+                    }
+                )
+            }
+        }
+    };
+}
+macro_rules! IrTypeWith2 {
+    ($name:tt, $param1:tt, $param2:tt) => {
+        /// An Ir node
+        #[derive(Debug, Clone, Hash)]
+        pub struct $name<$param1, $param2> {
+            /// first inner value
+            pub inner1: $param1,
+            /// second inner value
+            pub inner2: $param2,
+        }
+
+
+        impl<$param1, $param2> $name<$param1, $param2> {
+            /// Creates new instance
+            #[allow(dead_code)]
+            pub fn new(op0: $param1, op1: $param2) -> Box<Self> {
+                Box::from(
+                    Self {
+                        inner1: op0,
+                        inner2: op1,
+                    }
+                )
+            }
+        }
+    };
+}
+macro_rules! IrTypeWith1 {
+    ($name:tt, $param1:tt) => {
+        /// An Ir node
+        #[derive(Debug, Clone, Hash)]
+        pub(crate) struct $name<$param1> {
+            /// inner value
+            pub(crate) inner1: $param1,
+        }
+
+
+        impl<$param1> $name<$param1> {
+            /// Creates new instance
+            #[allow(dead_code)]
+            pub(crate) fn new(op0: $param1) -> Box<Self> {
+                Box::from(
+                    Self {
+                        inner1: op0,
+                    }
+                )
+            }
+        }
+    };
+}
+
+IrTypeWith1!(Return, T);
+IrTypeWith2!(ConstAssign, T, U);
+IrTypeWith3!(Add, T, U, Z);
+
+use crate::Support::Colorize;
+
+impl Ir for Return<Type> {
+    fn clone_box(&self) -> Box<dyn Ir> {
+        Box::new(self.clone())
+    }
+
+    fn name(&self) -> String {
+        "RetType".into()
+    }
+
+    fn dump(&self) -> String {
+        let metadata: TypeMetadata = self.inner1.into();
+        format!("ret {} {}", metadata, self.inner1.val())
+    }
+
+    fn dumpColored(&self) -> String {
+        let metadata: TypeMetadata = self.inner1.into();
+        format!("{} {} {}", "ret".blue(), metadata.to_string().cyan(), self.inner1.val().to_string().blue())
+    }
+
+    fn verify(&self, FuncTy: FunctionType) -> Result<(), VerifyError> {
+        let ty: TypeMetadata = self.inner1.into();
+
+        if ty != FuncTy.ret {
+            Err(VerifyError::RetTyNotFnTy(ty, FuncTy.ret))?
+        }
+
+        Ok(())
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+}
+
+impl Ir for Return<Var> {
+    fn clone_box(&self) -> Box<dyn Ir> {
+        Box::new(self.clone())
+    }
+
+    fn name(&self) -> String {
+        "RetVar".into()
+    }
+
+    fn dump(&self) -> String {
+        format!("ret {} {}", self.inner1.ty, self.inner1.name)
+    }
+
+    fn dumpColored(&self) -> String {
+        format!("{} {} {}", "ret".blue(), self.inner1.ty.to_string().cyan(), self.inner1.name.to_string().magenta())
+    }
+
+    fn verify(&self, FuncTy: FunctionType) -> Result<(), VerifyError> {
+        let ty: TypeMetadata = self.inner1.ty.into();
+
+        if ty != FuncTy.ret {
+            Err(VerifyError::RetTyNotFnTy(ty, FuncTy.ret))?
+        }
+
+        Ok(())
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+}
+
+impl Ir for Add<Type, Type, Var> {
+    fn clone_box(&self) -> Box<dyn Ir> {
+        Box::new(self.clone())
+    }
+
+    fn name(&self) -> String {
+        "AddTypeType".into()
+    }
+
+    fn dump(&self) -> String {
+        format!("{} = add {} {}, {}", self.inner3.name, self.inner3.ty, self.inner1.val(), self.inner2.val())
+    }
+
+    fn dumpColored(&self) -> String {
+        format!("{} = {} {} {}, {}", 
+                self.inner3.name.magenta(), 
+                "add".blue(), 
+                self.inner3.ty.to_string().cyan(), 
+                self.inner1.val().to_string().magenta(), 
+                self.inner2.val().to_string().magenta()
+            )
+    }
+
+    fn verify(&self, _: FunctionType) -> Result<(), VerifyError> {
+        let op0Ty: TypeMetadata = self.inner1.into();
+        let op1Ty: TypeMetadata = self.inner2.into();
+        let op2Ty: TypeMetadata = self.inner3.ty.into();
+
+        if !(op0Ty == op1Ty && op1Ty == op2Ty) {
+            if op0Ty != op1Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op0Ty, op1Ty))?
+            } else if op1Ty != op2Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op1Ty, op2Ty))?
+            } if op0Ty != op2Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op0Ty, op2Ty))?
+            } else { todo!("unknown error variant (debug: ty0 {} ty1 {} ty2 {})", op0Ty, op1Ty, op2Ty) }
+        }
+
+        Ok(())
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+}
+
+impl Ir for Add<Var, Var, Var> {
+    fn clone_box(&self) -> Box<dyn Ir> {
+        Box::new(self.clone())
+    }
+
+    fn name(&self) -> String {
+        "AddVarVar".into()
+    }
+
+    fn dump(&self) -> String {
+        format!("{} = add {} {}, {}", self.inner3.name, self.inner3.ty, self.inner1.name, self.inner2.name)
+    }
+
+    fn dumpColored(&self) -> String {
+        format!("{} = {} {} {}, {}", 
+                self.inner3.name.magenta(), 
+                "add".blue(), 
+                self.inner3.ty.to_string().cyan(), 
+                self.inner1.name.to_string().magenta(), 
+                self.inner2.name.to_string().magenta()
+            )
+    }
+
+    fn verify(&self, _: FunctionType) -> Result<(), VerifyError> {
+        let op0Ty: TypeMetadata = self.inner1.ty.into();
+        let op1Ty: TypeMetadata = self.inner2.ty.into();
+        let op2Ty: TypeMetadata = self.inner3.ty.into();
+
+        if !(op0Ty == op1Ty && op1Ty == op2Ty) {
+            if op0Ty != op1Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op0Ty, op1Ty))?
+            } else if op1Ty != op2Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op1Ty, op2Ty))?
+            } if op0Ty != op2Ty {
+                Err(VerifyError::Op0Op1TyNoMatch(op0Ty, op2Ty))?
+            } else { todo!("unknown error variant (debug: ty0 {} ty1 {} ty2 {})", op0Ty, op1Ty, op2Ty) }
+        }
+
+        Ok(())
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+}
+
+impl Ir for ConstAssign<Var, Type> {
+    fn dump(&self) -> String {
+        let meta: TypeMetadata = self.inner2.into();
+        format!("{} = {} {}", self.inner1.name, meta, self.inner2.val())
+    }
+
+    fn dumpColored(&self) -> String {
+        let meta: TypeMetadata = self.inner2.into();
+        format!("{} = {} {}", 
+            self.inner1.name.magenta(), 
+            meta.to_string().cyan(), 
+            self.inner2.val().to_string().blue()
+        )
+    }
+
+    fn name(&self) -> String {
+        "AssignVarType".into()
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+
+    fn verify(&self, _: FunctionType) -> Result<(), VerifyError> {
+        let op0Ty = self.inner1.ty;
+        let op1Ty = self.inner2.into();
+        if op0Ty != op1Ty {
+            Err(VerifyError::Op0Op1TyNoMatch(op0Ty, op1Ty))?
+        }
+
+        Ok(())
+    }
+
+    fn clone_box(&self) -> Box<dyn Ir> {
+        Box::new(self.clone())
+    }
+}
+
+/// Trait for the return instruction
+/// Used for overloading the CreateRet function
+/// So you can return a TypeConstant or a variable
+pub trait BuildReturn<T> {
+    /// Returns specified value
+    fn BuildRet(&mut self, val: T);
+}
+
+impl BuildReturn<Type> for IRBuilder<'_> {
+    fn BuildRet(&mut self, val: Type) {
+        self.blocks.get_mut(self.curr).expect("the IRBuilder needs to have an current block\nConsider creating one")
+            .push_ir(Return::new(val))
+    }
+}
+
+impl BuildReturn<Var> for IRBuilder<'_> {
+    fn BuildRet(&mut self, var: Var) {
+        self.blocks.get_mut(self.curr).expect("the IRBuilder needs to have an current block\nConsider creating one")
+            .push_ir(Return::new(var))
+    }
+}
+
+/// Trait for the return instruction
+/// Used for overloading the CreateRet function
+/// So you can return a TypeConstant or a variable
+pub trait BuildAdd<T, U> {
+    /// Adds to values
+    fn BuildAdd(&mut self, op0: T, op1: U) -> Var;
+}
+
+impl BuildAdd<Type, Type> for IRBuilder<'_> {
+    fn BuildAdd(&mut self, op0: Type, op1: Type)  -> Var {
+        let block = self.blocks.get_mut(self.curr).expect("the IRBuilder needs to have an current block\nConsider creating one");
+        
+        let op0Ty: TypeMetadata = op0.into();
+
+        let ty = op0Ty; // now both types need to be the same
+        let var = Var::new(block, ty);
+
+        block.push_ir(Add::new(op0, op1, var.clone()));
+
+        var
+    }
+}
+
+impl BuildAdd<Var, Var> for IRBuilder<'_> {
+    fn BuildAdd(&mut self, op0: Var, op1: Var)  -> Var {
+        let block = self.blocks.get_mut(self.curr).expect("the IRBuilder needs to have an current block\nConsider creating one");
+        
+        let op0Ty: TypeMetadata = op0.ty.into();
+
+        let ty = op0Ty; // now both types need to be the same
+        let var = Var::new(block, ty);
+
+        block.push_ir(Add::new(op0, op1, var.clone()));
+
+        var
+    }
+}
+
+/// The ir trait
+pub(crate) trait Ir: Debug + Any {
+    /// Returns the ir node as his textual representation
+    fn dump(&self) -> String;
+    /// Returns the ir node as his textual representation with colors
+    fn dumpColored(&self) -> String;
+
+    /// Returns the name of the ir expr
+    fn name(&self) -> String;
+
+    /// Turns the ir node to an any
+    fn as_any(&self) -> &dyn Any;
+
+    fn verify(&self, FuncTy: FunctionType) -> Result<(), VerifyError>;
+
+    /// Clones the node into a box of `Box<dyn Ir>`
+    fn clone_box(&self) -> Box<dyn Ir>;
+}
+
+impl Clone for Box<dyn Ir> {
+    fn clone(&self) -> Box<dyn Ir> {
+        self.clone_box()
+    }
+}
+
+/// Used for sus workaround to replace current ir node
+pub trait Replace<T> {
+    /// Replaces current ir node
+    fn replace(&mut self, other: T);
+}
+
+impl Replace<Box<dyn Ir>> for Box<dyn Ir> {
+    fn replace(&mut self, other: Box<dyn Ir>) {
+        *self = other
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/IR/mod.rs.html b/src/Ygen/IR/mod.rs.html new file mode 100644 index 00000000..a4bcb02f --- /dev/null +++ b/src/Ygen/IR/mod.rs.html @@ -0,0 +1,98 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
mod module;
+mod func;
+mod typ;
+mod builder;
+mod block;
+mod var;
+/// Stores all ir nodes and the ir trait
+pub mod ir;
+
+use std::error::Error;
+use std::fmt::Display;
+
+pub use module::Module;
+pub use func::{Function, FunctionType, FnTy, Func};
+pub use typ::Type;
+pub use typ::TypeMetadata;
+pub use builder::IRBuilder;
+pub use block::Block;
+pub use var::Var;
+
+/// An error which stores if an ir node is invalid
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum VerifyError {
+    /// The type of the ret node doesn't match the function return type
+    RetTyNotFnTy(TypeMetadata, TypeMetadata),
+    /// The type of op0 operand doesn't match the type of the op1 operand
+    Op0Op1TyNoMatch(TypeMetadata, TypeMetadata),
+}
+
+impl Display for VerifyError {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", match &self {
+            VerifyError::RetTyNotFnTy(retTy, fnTy) => {
+                format!(
+                        "The return type of the return node needs to be the same as the one of the function:\n{}",
+                format!("  ret {} ... but the function return type is {}", retTy, fnTy),
+                )
+            },
+            VerifyError::Op0Op1TyNoMatch(op0Ty, op1Ty) => {
+                format!(
+                        "The type of the 1. operand needs to be the same as the one of the second operand:\n{}",
+                format!("  op0 {} ... but the op1 type is {}", op0Ty, op1Ty),
+                )
+                
+            },
+        })
+    }
+}
+impl Error for VerifyError {}
\ No newline at end of file diff --git a/src/Ygen/IR/module.rs.html b/src/Ygen/IR/module.rs.html new file mode 100644 index 00000000..bb75b216 --- /dev/null +++ b/src/Ygen/IR/module.rs.html @@ -0,0 +1,177 @@ +module.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
use crate::PassManager;
+
+use super::{func::FunctionType, Function, VerifyError};
+use std::collections::HashMap;
+
+/// ## The Module
+/// The main class for handeling functions
+#[derive(Debug, Clone)]
+pub struct Module {
+    pub(crate) funcs: HashMap<String, Function>,
+}
+
+impl Module {
+    /// Creates a new module
+    pub fn new() -> Self {
+        Self {
+            funcs: HashMap::new(),
+        }
+    }
+
+    /// Adds a new function to the module
+    pub fn add(&mut self, name: &str, ty: &FunctionType) -> &mut Function {
+        self.funcs
+            .insert(name.to_string(), Function::new(name.to_string(), ty.to_owned()));
+        self.funcs.get_mut(name).unwrap()
+    }
+
+    #[allow(dead_code)]
+    /// Returns a read only reference to the given function name
+    /// ### Used for passes
+    pub(crate) fn getFunc(&self, name: &str) -> Option<&Function> {
+        self.funcs.get(name)
+    }
+
+    #[allow(dead_code)]
+    /// Returns a mutable reference to the given function name
+    /// ### Used for passes
+    pub(crate) fn getMutFunc(&mut self, name: &str) -> Option<&mut Function> {
+        self.funcs.get_mut(name)
+    }
+
+    /// Emits the ir of the entire moudle into one string
+    /// Maybe save to an file
+    pub fn dump(&self) -> String {
+        let mut string = String::new();
+
+        for (_, func) in &self.funcs {
+            string += &format!("{}\n", func.dump());
+        }
+
+        string
+    }
+    
+    /// Emits the ir of the entire module into a colored string
+    /// Maybe output to stdout
+    pub fn dumpColored(&self) -> String {
+        let mut string = String::new();
+
+        for (_, func) in &self.funcs {
+            string += &format!("{}\n", func.dumpColored());
+        }
+
+        string
+    }
+
+    /// Checks if every function is correct:
+    ///  * Checks if the return type is the actual specified return type of the function
+    ///  * Checks all ir nodes
+    pub fn verify(&self) -> Result<(), VerifyError> {
+        for (_, func) in &self.funcs {
+            func.verify()?
+        }
+
+        Ok(())
+    }
+
+    /// Runs the pass manager over all functions
+    pub fn runPassMngr(&mut self, mngr: PassManager::PassManager) {
+        for (_, func) in &mut self.funcs {
+            func.runPassMngr(&mngr)
+        }
+    }
+}
+
+/// Creates a new module
+pub fn Module() -> Module {
+    Module::new()
+}
+
\ No newline at end of file diff --git a/src/Ygen/IR/typ.rs.html b/src/Ygen/IR/typ.rs.html new file mode 100644 index 00000000..ebad2b5c --- /dev/null +++ b/src/Ygen/IR/typ.rs.html @@ -0,0 +1,234 @@ +typ.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+
use std::fmt::Display;
+
+/// Stores a type and a value of that type
+/// 
+/// If you want an empty Type consider using `TypeMetadata`
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[allow(non_camel_case_types)]
+pub enum Type {
+    /// Just an u16 with a value
+    u16(u16),
+    /// Just an u32 with a value
+    u32(u32),
+    /// Just an u64 with a value
+    u64(u64),
+
+    /// Just an i16 with a value
+    i16(i16),
+    /// Just an i32 with a value
+    i32(i32),
+    /// Just an i64 with a value
+    i64(i64),
+
+    /// Notype
+    Void,
+}
+
+/// Stores type metadata (just the type without data)
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+#[allow(non_camel_case_types)]
+pub enum TypeMetadata {
+    /// u16
+    u16,
+    /// u32
+    u32,
+    /// u64
+    u64,
+
+    /// i16
+    i16,
+    /// i32
+    i32,
+    /// i64
+    i64,
+
+    /// Notype
+    Void,
+}
+
+impl Type {
+    /// Returns the inner value
+    pub fn val(&self) -> u64 {
+        match self {
+            Type::u16(val) => *val as u64,
+            Type::u32(val) => *val as u64,
+            Type::u64(val) => *val as u64,
+            Type::i16(val) => *val as u64,
+            Type::i32(val) => *val as u64,
+            Type::i64(val) => *val as u64,
+            Type::Void => 0,
+        }
+    }
+}
+
+impl Display for Type {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", match &self {
+            Type::u16(i) => format!("u16 {}", i),
+            Type::u32(i) => format!("u32 {}", i),
+            Type::u64(i) => format!("u64 {}", i),
+            Type::i16(i) => format!("i16 {}", i),
+            Type::i32(i) => format!("i32 {}", i),
+            Type::i64(i) => format!("i64 {}", i),
+            Type::Void => format!("void"),
+        })
+    }
+}
+impl Display for TypeMetadata {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", match &self {
+            TypeMetadata::u16 => "u16",
+            TypeMetadata::u32 => "u32",
+            TypeMetadata::u64 => "u64",
+            TypeMetadata::i16 => "i16",
+            TypeMetadata::i32 => "i32",
+            TypeMetadata::i64 => "i64",
+            TypeMetadata::Void => "void",
+        })
+    }
+}
+
+impl From<Type> for TypeMetadata {
+    fn from(value: Type) -> Self {
+        match value {
+            Type::u16(_) => TypeMetadata::u16,
+            Type::u32(_) => TypeMetadata::u32,
+            Type::u64(_) => TypeMetadata::u64,
+            Type::i16(_) => TypeMetadata::i16,
+            Type::i32(_) => TypeMetadata::i32,
+            Type::i64(_) => TypeMetadata::i64,
+            Type::Void => TypeMetadata::Void,
+        }
+    }
+}
+
+impl From<TypeMetadata> for Type {
+    fn from(value: TypeMetadata) -> Self {
+        match value {
+            TypeMetadata::u16 => Type::u16(0),
+            TypeMetadata::u32 => Type::u32(0),
+            TypeMetadata::u64 => Type::u64(0),
+            TypeMetadata::i16 => Type::i16(0),
+            TypeMetadata::i32 => Type::i32(0),
+            TypeMetadata::i64 => Type::i64(0),
+            TypeMetadata::Void => Type::Void,
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/IR/var.rs.html b/src/Ygen/IR/var.rs.html new file mode 100644 index 00000000..0aa1ee5d --- /dev/null +++ b/src/Ygen/IR/var.rs.html @@ -0,0 +1,46 @@ +var.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
use super::{Block, TypeMetadata};
+
+/// A variable
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct Var {
+    pub(crate) name: String,
+    pub(crate) ty: TypeMetadata,
+}
+
+impl Var {
+    /// Creats a new variable
+    pub fn new(block: &mut Block, ty: TypeMetadata) -> Self {
+        Self {
+            name: format!("%{}", block.reqVarName()),
+            ty: ty,
+        }
+    } 
+}
+
+/// Creates a new variable
+pub fn Var(block: &mut Block, ty: TypeMetadata) -> Var {
+    Var::new(block, ty)
+}
\ No newline at end of file diff --git a/src/Ygen/Obj/mod.rs.html b/src/Ygen/Obj/mod.rs.html new file mode 100644 index 00000000..b9956d20 --- /dev/null +++ b/src/Ygen/Obj/mod.rs.html @@ -0,0 +1,12 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+
mod wrapper;
+
+pub use wrapper::{
+    ObjectBuilder,
+    Decl, Link, Linkage,
+};
\ No newline at end of file diff --git a/src/Ygen/Obj/wrapper.rs.html b/src/Ygen/Obj/wrapper.rs.html new file mode 100644 index 00000000..649751d4 --- /dev/null +++ b/src/Ygen/Obj/wrapper.rs.html @@ -0,0 +1,566 @@ +wrapper.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+
use object::write::{Relocation, SectionId, Symbol, SymbolId, SymbolSection};
+use object::{Architecture, BinaryFormat, Endianness, RelocationEncoding, RelocationFlags, RelocationKind, SectionKind, SymbolFlags, SymbolKind, SymbolScope};
+
+use crate::prelude::Triple;
+use crate::Target::{self, Arch};
+use std::collections::HashMap;
+use std::fs::File;
+use std::error::Error;
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+enum ObjectError {
+    UnsupportedArch(Arch),
+    DefWithoutDecl(String),
+}
+
+impl std::fmt::Display for ObjectError {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", match self {
+            ObjectError::UnsupportedArch(arch) => format!("unsupported architecture for writing to object files: {:?}", arch),
+            ObjectError::DefWithoutDecl(name) => format!("definition without an corresponding decleration: {}", name),
+        })
+    }
+}
+
+impl std::error::Error for ObjectError {}
+
+/// A decl to say what's the label/func
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Decl {
+    /// A function
+    Function,
+    /// A mutable data (E.g: a global variable)
+    Data,
+    /// A constant data
+    Constant,
+}
+
+/// Links from one symbol to another
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct Link {
+    /// The link source
+    pub from: String,
+    /// The link destination
+    pub to: String,
+    /// The binary offset of the start of the function
+    pub at: usize,
+    /// The addend to use
+    pub addend: i64,
+}
+
+/// The linkage of the target symbol
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Linkage {
+    /// Can be seen outside and inside of object file
+    External,
+    /// From another object file
+    Extern,
+    /// Only aviable in the object file
+    Internal,
+}
+
+/// Builds object files.
+/// It also supports debugging information
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct ObjectBuilder {
+    defines: HashMap<String, Vec<u8>>,
+    links: Vec<Link>,
+
+    decls: Vec<(String, Decl, Linkage)>,
+
+    triple: Triple
+}
+
+impl ObjectBuilder {
+    /// Creates an new object builder
+    pub fn new(triple: Triple) -> Self {
+        Self {
+            defines: HashMap::new(),
+
+            links: vec![],
+
+            decls: vec![],
+
+            triple: triple
+        }
+    }
+
+    /// Sets the decls of the function
+    pub fn decls(&mut self, decls: Vec<(&str, Decl, Linkage)>) {
+        for decl in decls {
+            self.decl(decl);
+        }
+    }
+
+    /// Adds one decl to the function
+    pub fn decl(&mut self, decl: (&str, Decl, Linkage)) {
+        self.decls.push((decl.0.to_string(), decl.1, decl.2));
+    }
+
+    /// Defines a symbol
+    pub fn define(&mut self, name: &str, data: Vec<u8>) {
+        self.defines.insert(name.to_string(), data);
+    }
+
+    /// Links from one symbol to another
+    pub fn link(&mut self, link: Link) {
+        self.links.push(link);
+    }
+
+    /// Writes the object file into the the specified file
+    pub fn emit(&self, file: File) -> Result<(), Box<dyn Error>> {
+
+        let mut obj = object::write::Object::new({
+            match self.triple.bin {
+                Target::ObjFormat::Unknown => BinaryFormat::native_object(),
+                Target::ObjFormat::Coff => BinaryFormat::Coff,
+                Target::ObjFormat::Elf => BinaryFormat::Elf,
+                Target::ObjFormat::MachO => BinaryFormat::MachO,
+                Target::ObjFormat::Wasm => BinaryFormat::Wasm,
+                Target::ObjFormat::XCoff => BinaryFormat::Xcoff,
+                Target::ObjFormat::Default => BinaryFormat::native_object(),
+            }
+        }, {
+            match self.triple.arch {
+                Target::Arch::Arm => Architecture::Arm,
+                Target::Arch::Aarch64 => Architecture::Aarch64,
+                Target::Arch::Avr => Architecture::Avr,
+                Target::Arch::Bpfel => Architecture::Bpf,
+                Target::Arch::Bpfeb => Architecture::Bpf,
+                Target::Arch::Hexagon => Architecture::Hexagon,
+                Target::Arch::Mips => Architecture::Mips,
+                Target::Arch::Mips64 => Architecture::Mips64,
+                Target::Arch::Msp420 => Architecture::Msp430,
+                Target::Arch::Ppc => Architecture::PowerPc,
+                Target::Arch::Ppc64 => Architecture::PowerPc64,
+                Target::Arch::Riscv32 => Architecture::Riscv32,
+                Target::Arch::Riscv64 => Architecture::Riscv64,
+                Target::Arch::Sparc => Architecture::Sparc,
+                Target::Arch::X86 => Architecture::X86_64_X32,
+                Target::Arch::X86_64 => Architecture::X86_64,
+                Target::Arch::Wasm32 => Architecture::Wasm32,
+                Target::Arch::Wasm64 => Architecture::Wasm64,
+                other => Err( ObjectError::UnsupportedArch(other) )?,
+            }
+        }, {
+            match self.triple.arch {
+                Target::Arch::Arm => Endianness::Little,    
+                Target::Arch::Aarch64 => Endianness::Little,
+                Target::Arch::Avr => Endianness::Little,
+                Target::Arch::Bpfel => Endianness::Little,
+                Target::Arch::Bpfeb => Endianness::Big,
+                Target::Arch::Hexagon => Endianness::Little,
+                Target::Arch::Mips => Endianness::Big,
+                Target::Arch::Mips64 => Endianness::Big,
+                Target::Arch::Msp420 => Endianness::Little,
+                Target::Arch::Ppc => Endianness::Big,
+                Target::Arch::Ppc64 => Endianness::Big,
+                Target::Arch::Riscv32 => Endianness::Little,
+                Target::Arch::Riscv64 => Endianness::Little,
+                Target::Arch::Sparc => Endianness::Big,
+                Target::Arch::X86 => Endianness::Little,
+                Target::Arch::X86_64 =>  Endianness::Little,
+                Target::Arch::Wasm32 =>  Endianness::Little,
+                Target::Arch::Wasm64 =>  Endianness::Little,
+                _ => unreachable!(), // cannot panic cuz the archs are filtered out by the prefius call
+            }
+        });
+
+        let secText = obj.add_section(vec![], "text".as_bytes().to_vec(), SectionKind::Text);
+        let secData = obj.add_section(vec![], "data".as_bytes().to_vec(), SectionKind::Data);
+        let secConsts = obj.add_section(vec![], "rodata".as_bytes().to_vec(), SectionKind::ReadOnlyData);
+
+        let mut syms: HashMap<String, (Option<SectionId>, Option</*offsest*/u64>, SymbolId)> = HashMap::new();
+
+        for (name, data) in &self.defines {
+            let name = name.to_owned();
+            let data = data.to_owned();
+
+            let mut decl = None;
+            let mut link = None;
+
+            for (declName, declDecl, declLink) in &self.decls {
+                if *declName == name {
+                    decl = Some(declDecl); 
+                    link = Some(declLink);
+                }
+            }
+
+            if decl == None {
+                Err( ObjectError::DefWithoutDecl(name.clone()) )?
+            }
+            let decl = decl.unwrap();
+            let link = link.unwrap();
+
+            let sym = obj.add_symbol(Symbol {
+                name: name.clone().as_bytes().to_vec(),
+                value: 0,
+                size: (data.len() - 1) as u64,
+                kind: {
+                    match decl {
+                        Decl::Function => SymbolKind::Text,
+                        Decl::Data => SymbolKind::Data,
+                        Decl::Constant => SymbolKind::Label,
+                    }
+                },
+                scope: {
+                    match link {
+                        Linkage::External => SymbolScope::Linkage,
+                        Linkage::Extern => SymbolScope::Linkage,
+                        Linkage::Internal => SymbolScope::Compilation,
+                    }
+                },
+                weak: false,
+                section: SymbolSection::Undefined,
+                flags: SymbolFlags::None,
+            });
+
+            /*let def_section = match decl {
+                Decl::Function => obj.add_subsection(StandardSection::Text, name.as_bytes()),
+                Decl::Data => obj.add_subsection(StandardSection::Data, name.as_bytes()),
+                Decl::Constant => obj.add_subsection(StandardSection::ReadOnlyData, name.as_bytes()),
+            };*/
+
+            let def_offset = match decl {
+                Decl::Function => obj.add_symbol_data(sym, secText, &data, 16),
+                Decl::Data => obj.add_symbol_data(sym, secData, &data, 16),
+                Decl::Constant => obj.add_symbol_data(sym, secConsts, &data, 16),
+            };
+
+            syms.insert(name.clone(), (None, Some(def_offset), sym));
+        }
+
+        for (name, decl, linkage) in &self.decls { // for extern symbols
+            if *linkage == Linkage::Extern {
+                let sym = obj.add_symbol(Symbol {
+                    name: name.as_bytes().to_vec(),
+                    value: 0,
+                    size: 0,
+                    kind: {
+                        match decl {
+                            Decl::Function => SymbolKind::Text,
+                            Decl::Data => SymbolKind::Data,
+                            Decl::Constant => SymbolKind::Data,
+                        }
+                    },
+                    scope: SymbolScope::Unknown,
+                    weak: false,
+                    section: SymbolSection::Undefined,
+                    flags: SymbolFlags::None,
+                });
+                syms.insert(name.clone(), (None, None, sym));
+            }
+        }
+
+        for link in &self.links {
+            let (_, off, _) = syms.get(&link.from).unwrap();
+            let (_, _, to_sym) = syms.get(&link.to).unwrap();
+
+            obj.add_relocation(secText, Relocation {
+                offset: link.at as u64,
+                symbol: to_sym.to_owned(),
+                addend: link.addend + {if let Some(off) = off { *off as i64} else { 0 }},
+                flags: RelocationFlags::Generic { 
+                    kind: RelocationKind::PltRelative, 
+                    encoding: {
+                        match &self.triple.arch {
+                            Target::Arch::Aarch64 => RelocationEncoding::AArch64Call,
+                            Target::Arch::Aarch64BE => RelocationEncoding::AArch64Call,
+                            Target::Arch::X86 => RelocationEncoding::X86Branch,
+                            Target::Arch::X86_64 =>  RelocationEncoding::X86Branch,
+                            _ => RelocationEncoding::Generic,
+                        }
+                    }, 
+                    size: 32, 
+                },
+            })?;
+        }
+
+        obj.write_stream(file)?;
+
+        Ok(())
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/PassManager/Passes/MathEval.rs.html b/src/Ygen/PassManager/Passes/MathEval.rs.html new file mode 100644 index 00000000..1980e4ff --- /dev/null +++ b/src/Ygen/PassManager/Passes/MathEval.rs.html @@ -0,0 +1,66 @@ +MathEval.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
use crate::{prelude::*, PassManager::Pass};
+
+/// ## Pass InlineConstValue <br>
+/// Inlines constant values
+pub struct PreComputeValue {}
+
+/// Creates a new PreComputeValue pass which is heap allocated
+pub fn PreComputeValue() -> Box<PreComputeValue> {
+    Box::from( PreComputeValue {} )
+}
+
+impl Pass for PreComputeValue {
+    fn run(&self, block: &mut crate::prelude::Block) {
+        for node in block.nodes.iter_mut() {
+            if &node.name() == "AddTypeType" {
+                let any = node.as_any();
+                let add_node = any.downcast_ref::<Add<Type, Type, Var>>().unwrap().clone();
+                let res = add_node.inner1.val() + add_node.inner2.val();
+                node.replace(ConstAssign::new(add_node.inner3.clone(), {
+                    match add_node.inner3.ty {
+                        TypeMetadata::u16 => Type::u16(res as u16),
+                        TypeMetadata::u32 => Type::u32(res as u32),
+                        TypeMetadata::u64 => Type::u64(res as u64),
+                        TypeMetadata::i16 => Type::i16(res as i16),
+                        TypeMetadata::i32 => Type::i32(res as i32),
+                        TypeMetadata::i64 => Type::i64(res as i64),
+                        TypeMetadata::Void => Type::Void,
+                    }
+                }))
+            }
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/PassManager/Passes/mod.rs.html b/src/Ygen/PassManager/Passes/mod.rs.html new file mode 100644 index 00000000..ce3ce1ad --- /dev/null +++ b/src/Ygen/PassManager/Passes/mod.rs.html @@ -0,0 +1,10 @@ +mod.rs - source
1
+2
+3
+4
+5
+
//mod MathInline;
+mod MathEval;
+
+pub use MathEval::PreComputeValue;
+//pub use MathInline::InlineConstValue;
\ No newline at end of file diff --git a/src/Ygen/PassManager/mngr.rs.html b/src/Ygen/PassManager/mngr.rs.html new file mode 100644 index 00000000..0fe7f963 --- /dev/null +++ b/src/Ygen/PassManager/mngr.rs.html @@ -0,0 +1,68 @@ +mngr.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
use std::collections::VecDeque;
+use crate::IR::Block;
+use super::Pass;
+
+/// The manager of all passes (PassManager)
+pub struct PassManager {
+    passes: VecDeque<Box<dyn Pass>>,
+}
+
+impl PassManager {
+    /// Creates an new pass manager
+    pub fn new() -> Self {
+        Self {
+            passes: VecDeque::new(),
+        }
+    }
+
+    /// Adds a new pass to the back of the pass queue
+    pub fn add(&mut self, pass: Box<dyn Pass>)  {
+        self.passes.push_back( pass );
+    }
+
+    /// Adds a new pass to the front of the pass queue
+    pub fn addFront(&mut self, pass: Box<dyn Pass>)  {
+        self.passes.push_front( pass );
+    }
+
+    /// Executes the entire pass queue
+    pub fn run(&self, block: &mut Block) {
+        for pass in &self.passes {
+            pass.run(block);
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/PassManager/mod.rs.html b/src/Ygen/PassManager/mod.rs.html new file mode 100644 index 00000000..a7142be6 --- /dev/null +++ b/src/Ygen/PassManager/mod.rs.html @@ -0,0 +1,14 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+
mod mngr;
+mod template;
+/// all passes
+pub mod Passes;
+
+pub use mngr::PassManager;
+pub use template::Pass;
\ No newline at end of file diff --git a/src/Ygen/PassManager/template.rs.html b/src/Ygen/PassManager/template.rs.html new file mode 100644 index 00000000..e2b6e68d --- /dev/null +++ b/src/Ygen/PassManager/template.rs.html @@ -0,0 +1,14 @@ +template.rs - source
1
+2
+3
+4
+5
+6
+7
+
use crate::IR::Block;
+
+/// The trait all Passes need to implement
+pub trait Pass {
+    /// Returns the pass
+    fn run(&self, block: &mut Block);
+}
\ No newline at end of file diff --git a/src/Ygen/Support/cli.rs.html b/src/Ygen/Support/cli.rs.html new file mode 100644 index 00000000..631ceec5 --- /dev/null +++ b/src/Ygen/Support/cli.rs.html @@ -0,0 +1,420 @@ +cli.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+
use crate::Support::Colorize;
+use crate::Support::Pad;
+
+use std::collections::VecDeque;
+use std::env;
+use std::process::exit;
+
+/// A cli option
+struct CliOpt {
+    pub(crate) short: String,
+    pub(crate) long: String,
+    pub(crate) desc: String,
+
+    pub(crate) was_there: bool, // if the scan is already done, this var saves if it was seen
+}
+
+/// A cli argument seperated by a =
+struct CliArg {
+    pub(crate) short: String,
+    pub(crate) long: String,
+    pub(crate) desc: String,
+
+    pub(crate) required: bool,
+
+    pub(crate) value: String, // if the scan is already done, this var saves what was there
+    pub(crate) was_there: bool, // if the scan is already done, this var saves if it was seen
+}
+
+/// A command line parser
+pub struct Cli {
+    opts: Vec<CliOpt>,
+    args: Vec<CliArg>,
+
+    app_desc: String,
+    app_version: String,
+    app_name: String,
+    app_author: String,
+}
+
+impl Cli {
+    /// Creates a new CLI parser
+    pub fn new(name: &str, desc: &str, version: &str, author: &str) -> Self {
+        Self {
+            opts: vec![],
+            args: vec![],
+
+            app_name: name.to_string(),
+            app_desc: desc.to_string(),
+            app_version: version.to_string(),
+            app_author: author.to_string(),
+        }
+    }
+
+    /// Adds an option
+    pub fn add_opt(&mut self, short: &str, long: &str, desc: &str) {
+        self.opts.push(CliOpt { short: short.to_string(), long: long.to_string(), desc: desc.to_string(), was_there: false })
+    }
+
+    /// Adds an argument which is seperated by a `=`
+    pub fn add_arg(&mut self, short: &str, long: &str, desc: &str, required: bool,) {
+        self.args.push(CliArg { short: short.to_string(), long: long.to_string(), desc: desc.to_string(), required: required, was_there: false, value: String::new() })
+    }
+
+    /// Prints the version and description
+    pub fn version(&self) {
+        println!("{} v{} (c) {}", self.app_name, self.app_version, self.app_author);
+        println!("{}", self.app_desc);
+    }
+
+    /// Prints help
+    pub fn help(&self) {
+        let args: Vec<String> = env::args().collect();
+
+        self.version();
+
+        println!();
+
+        println!("{} {} [OPTIONS] [ARGS]", "Usage:".bold(), args[0]);
+
+        println!("{}", "Options:".bold());
+
+        let mut fmt: Vec<String> = vec![];
+
+        for opt in &self.opts {
+            fmt.push(format!("  -{}, --{}", opt.short, opt.long))
+        }
+
+        let mut longest = 0;
+
+        for fmt in &fmt {
+            let len = fmt.chars().count() as isize;
+
+            if len > longest {
+                longest = len;
+            }
+        }
+
+        let mut index = 0;
+        for opt in &self.opts {
+            println!("{} {}", fmt[index].pad_to_len(longest).bold(), opt.desc);
+            index += 1;
+        }
+        
+
+        println!();
+
+        println!("{}", "Arguments:".bold());
+
+        let mut fmt: Vec<String> = vec![];
+
+        for arg in &self.args {
+            fmt.push(format!("  -{}=<val>, --{}=<val>", arg.short, arg.long))
+        }
+
+        let mut longest = 0;
+
+        for fmt in &fmt {
+            let len = fmt.chars().count() as isize;
+
+            if len > longest {
+                longest = len;
+            }
+        }
+
+        let mut index = 0;
+        for arg in &self.args {
+            println!("{} {}", fmt[index].pad_to_len(longest).bold(), arg.desc);
+            index += 1;
+        }
+    }
+
+    /// Scans the arguments
+    pub fn scan(&mut self) {
+        let mut args: VecDeque<String> = env::args().collect();
+
+        args.pop_front(); // Pop exctuable path
+
+        for arg in args {
+            let mut handeld = false;
+
+            if arg.contains("=") {
+                for cliarg in self.args.iter_mut() {
+                    let splited = arg.split('=').collect::<Vec<&str>>();
+                    let arg: String = splited[0].to_string();
+                    let val: String = splited[1].to_string();
+                    if arg == format!("-{}", cliarg.short) || arg == format!("--{}", cliarg.long) {
+                        cliarg.was_there = true;
+                        cliarg.value = val;
+                        handeld = true;
+                    }
+                }
+            } else {
+                for opt in self.opts.iter_mut() {
+                    if arg == format!("-{}", opt.short) || arg == format!("--{}", opt.long) {
+                        opt.was_there = true;
+                        handeld = true;
+                    }
+                }
+            }
+
+            if !handeld {
+                println!("{} unexpected arg/opt: '{}'", "ERROR:".bold().red(), arg);
+                self.help();
+                exit(-1);
+            }
+        }
+
+        for arg in &self.args {
+            if arg.required && !arg.was_there {
+                println!("{} required argument: '-{}=<val>' wasn't given", "ERROR:".bold().red(), arg.short);
+                self.help();
+                exit(-1);
+            }
+        }
+
+    }
+
+    /// Returns true if option was seen
+    pub fn opt(&self, name: &str) -> bool {
+        for opt in &self.opts {
+            if (opt.short == name || opt.long == name) && opt.was_there {
+                return true;
+            }
+        }
+
+        false
+    }
+    
+    /// Returns true if argument was seen
+    pub fn arg(&self, name: &str) -> bool {
+        for arg in &self.args {
+            if (arg.short == name || arg.long == name) && arg.was_there {
+                return true;
+            }
+        }
+
+        false
+    }
+    
+    /// Returns the value of the seen argument
+    pub fn arg_val(&self, name: &str) -> Option<String> {
+        for arg in &self.args {
+            if (arg.short == name || arg.long == name) && arg.was_there {
+                return Some(arg.value.clone());
+            }
+        }
+
+        None
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Support/color.rs.html b/src/Ygen/Support/color.rs.html new file mode 100644 index 00000000..4b63c8d5 --- /dev/null +++ b/src/Ygen/Support/color.rs.html @@ -0,0 +1,1142 @@ +color.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+
#![allow(unused_assignments)]
+
+const ANSI_RESET: &str = "\x1b[0m";
+
+/// Color style
+pub(crate ) struct Style {
+    /// If the text is bold
+    pub(crate) bold: bool,
+    /// If the text is italic
+    pub(crate) italic: bool,
+    /// If the text is underlined
+    pub(crate) underlined: bool,
+    /// If the text is striketrough
+    pub(crate) strike: bool,
+
+    /// The background rgb color red channel
+    pub(crate) bg_r: u8,
+    /// The background rgb color green channel
+    pub(crate) bg_g: u8,
+    /// The background rgb color blue channel
+    pub(crate) bg_b: u8,
+    /// If the text has a background color
+    pub(crate) bg: bool,
+}
+
+/// Clorize trait: Colorizes a string
+pub trait Colorize {
+    /// Makes the string to the specified color
+    fn color(&self, r: i16, g: i16, b: i16) -> String;
+    /// Makes the string black
+    fn black(&self) -> String;
+    /// Makes the string red
+    fn red(&self) -> String;
+    /// Makes the string green
+    fn green(&self) -> String;
+    /// Makes the string yellow
+    fn yellow(&self) -> String;
+    /// Makes the string blue
+    fn blue(&self) -> String;
+    /// Makes the string magenta
+    fn magenta(&self) -> String;
+    /// Makes the string cyan
+    fn cyan(&self) -> String;
+    /// Makes the string white
+    fn white(&self) -> String;
+    /// Makes the string gray
+    fn gray(&self) -> String;
+
+    /// Makes the string to a specified background color
+    fn bg_color(&self, r: u8, g: u8, b: u8) -> String;
+    /// Makes the background of the string black
+    fn bg_black(&self) -> String;
+    /// Makes the background of the string red
+    fn bg_red(&self) -> String;
+    /// Makes the background of the string green
+    fn bg_green(&self) -> String;
+    /// Makes the background of the string yellow
+    fn bg_yellow(&self) -> String;
+    /// Makes the background of the string blue
+    fn bg_blue(&self) -> String;
+    /// Makes the background of the string magenta
+    fn bg_magenta(&self) -> String;
+    /// Makes the background of the string cyan
+    fn bg_cyan(&self) -> String;
+    /// Makes the background of the string white
+    fn bg_white(&self) -> String;
+    /// Makes the background of the string gray
+    fn bg_gray(&self) -> String;
+
+    /// Makes the string bold
+    fn bold(&self) -> String;
+    /// Makes the string italitc
+    fn italic(&self) -> String;
+    /// Makes the string underlined
+    fn underline(&self) -> String;
+    /// Makes the string striketrough
+    fn strike(&self) -> String;
+}
+
+impl<'a> Colorize for &'a str {
+    fn color(&self, r: i16, g: i16, b: i16) -> String {
+        ColoredString::new(
+            r,
+            g,
+            b,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false,
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn white(&self) -> String {
+        self.color(255, 255, 255)
+    }
+
+    fn black(&self) -> String {
+        self.color(1, 1, 1)
+    }
+
+    fn red(&self) -> String {
+        self.color(205, 49, 49)
+    }
+
+    fn green(&self) -> String {
+        self.color(13, 188, 121)
+    }
+
+    fn yellow(&self) -> String {
+        self.color(229, 229, 16)
+    }
+
+    fn blue(&self) -> String {
+        self.color(36, 114, 200)
+    }
+
+    fn magenta(&self) -> String {
+        self.color(188, 63, 188)
+    }
+
+    fn cyan(&self) -> String {
+        self.color(17, 168, 205)
+    }
+
+    fn gray(&self) -> String {
+        self.color(118, 118, 118)
+    }
+
+    fn bold(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: true,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn italic(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: true,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn underline(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: true,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn strike(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: true,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+    
+    fn bg_color(&self, r: u8, g: u8, b: u8) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: r, bg_b: g, bg_g: b, bg: true
+            },
+            self,
+        )
+        .to_string()
+    }
+    
+    fn bg_white(&self) -> String {
+        self.bg_color(255, 255, 255)
+    }
+
+    fn bg_black(&self) -> String {
+        self.bg_color(1, 1, 1)
+    }
+
+    fn bg_red(&self) -> String {
+        self.bg_color(205, 49, 49)
+    }
+
+    fn bg_green(&self) -> String {
+        self.bg_color(36, 114, 200)
+    }
+
+    fn bg_yellow(&self) -> String {
+        self.bg_color(229, 229, 16)
+    }
+
+    fn bg_blue(&self) -> String {
+        self.bg_color(13, 188, 121)
+    }
+
+    fn bg_magenta(&self) -> String {
+        self.bg_color(188, 63, 188)
+    }
+
+    fn bg_cyan(&self) -> String {
+        self.bg_color(17, 168, 205)
+    }
+
+    fn bg_gray(&self) -> String {
+        self.bg_color(118, 118, 118)
+    }
+}
+
+impl Colorize for String {
+    fn color(&self, r: i16, g: i16, b: i16) -> String {
+        ColoredString::new(
+            r,
+            g,
+            b,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn white(&self) -> String {
+        self.color(255, 255, 255)
+    }
+
+    fn black(&self) -> String {
+        self.color(1, 1, 1)
+    }
+
+    fn red(&self) -> String {
+        self.color(205, 49, 49)
+    }
+
+    fn green(&self) -> String {
+        self.color(13, 188, 121)
+    }
+
+    fn yellow(&self) -> String {
+        self.color(229, 229, 16)
+    }
+
+    fn blue(&self) -> String {
+        self.color(36, 114, 200)
+    }
+
+    fn magenta(&self) -> String {
+        self.color(188, 63, 188)
+    }
+
+    fn cyan(&self) -> String {
+        self.color(17, 168, 205)
+    }
+
+    fn gray(&self) -> String {
+        self.color(118, 118, 118)
+    }
+
+    fn bold(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: true,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn italic(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: true,
+                underlined: false,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn underline(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: true,
+                strike: false,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn strike(&self) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: true,
+                bg_r: 0, bg_b: 0, bg_g: 0, bg: false
+            },
+            self,
+        )
+        .to_string()
+    }
+
+    fn bg_color(&self, r: u8, g: u8, b: u8) -> String {
+        ColoredString::new(
+            -1,
+            -1,
+            -1,
+            Style {
+                bold: false,
+                italic: false,
+                underlined: false,
+                strike: false,
+                bg_r: r, bg_b: g, bg_g: b, bg: true
+            },
+            self,
+        )
+        .to_string()
+    }
+    
+    fn bg_white(&self) -> String {
+        self.bg_color(255, 255, 255)
+    }
+
+    fn bg_black(&self) -> String {
+        self.bg_color(1, 1, 1)
+    }
+
+    fn bg_red(&self) -> String {
+        self.bg_color(205, 49, 49)
+    }
+
+    fn bg_green(&self) -> String {
+        self.bg_color(13, 188, 121)
+    }
+
+    fn bg_yellow(&self) -> String {
+        self.bg_color(229, 229, 16)
+    }
+
+    fn bg_blue(&self) -> String {
+        self.bg_color(36, 114, 200)
+    }
+
+    fn bg_magenta(&self) -> String {
+        self.bg_color(188, 63, 188)
+    }
+
+    fn bg_cyan(&self) -> String {
+        self.bg_color(17, 168, 205)
+    }
+
+    fn bg_gray(&self) -> String {
+        self.bg_color(118, 118, 118)
+    }
+}
+
+pub(crate) struct ColoredString {
+    r: i16,
+    g: i16,
+    b: i16,
+
+    attr: Style,
+    str: String,
+}
+
+impl ColoredString {
+    pub(crate) fn new(_r: i16, _g: i16, _b: i16, _attr: Style, _str: &str) -> Self {
+        Self {
+            r: _r,
+            g: _g,
+            b: _b,
+            attr: _attr,
+            str: _str.into(),
+        }
+    }
+}
+
+impl ToString for ColoredString {
+    fn to_string(&self) -> String {
+        if self.r != -1 {
+            let rgb_str = format!(
+                "\x1b[38;2;{};{};{}",
+                self.r.to_string(),
+                self.g.to_string(),
+                self.b.to_string()
+            );
+
+            return format!("{rgb_str}m{}{ANSI_RESET}", self.str);
+        }
+
+        let style = &self.attr;
+
+        if style.bold {
+            let rgb_str = format!("\x1b[1m");
+            return format!("{rgb_str}{}{ANSI_RESET}", self.str);
+        }
+        if style.italic {
+            let rgb_str = format!("\x1b[3m");
+            return format!("{rgb_str}{}{ANSI_RESET}", self.str);
+        }
+        if style.underlined {
+            let rgb_str = format!("\x1b[4m");
+            return format!("{rgb_str}{}{ANSI_RESET}", self.str);
+        }
+        if style.strike {
+            let rgb_str = format!("\x1b[9m");
+            return format!("{rgb_str}{}{ANSI_RESET}", self.str);
+        }
+
+        if style.bg {
+            let rgb_str = format!("\x1b[48;2;{};{};{}",
+                self.attr.bg_r.to_string(),
+                self.attr.bg_g.to_string(),
+                self.attr.bg_b.to_string(),);
+
+            return format!("{rgb_str}m{}{ANSI_RESET}", self.str);
+        }
+
+        String::new()
+    }
+}
+
+/// Colore encoder:
+/// Encodes a string by a specifed format
+/// E.g: <blue>Hi I am blue<green>Hi I am green
+/// For that use the `encode` function
+pub struct ColorEncoder {}
+
+impl ColorEncoder {
+    /// Encodes a string by a specifed format
+    /// E.g: <blue>Hi I am blue<green>Hi I am gree(crate)n
+    pub fn encode(string: &str) -> String {
+        let mut str: String = string.into();
+
+        str = str.replace("<black>", &"".black());
+        str = str.replace("<red>", &"".red());
+        str = str.replace("<blue>", &"".blue());
+        str = str.replace("<green>", &"".green());
+        str = str.replace("<yellow>", &"".yellow());
+        str = str.replace("<magenta>", &"".magenta());
+        str = str.replace("<cyan>", &"".cyan());
+        str = str.replace("<white>", &"".white());
+        str = str.replace("<gray>", &"".gray());
+        str = str.replace("<bold>", &"".bold());
+        str = str.replace("<italic>", &"".italic());
+        str = str.replace("<underline>", &"".underline());
+        str = str.replace("<strike>", &"".strike());
+        str = str.replace(ANSI_RESET, "");
+
+        let chars = str.chars();
+        let mut l_c: char = '\0';
+        let mut clr_b = false;
+        let mut clr_str: String = String::new();
+
+        for c in chars {
+            if c == '>' && clr_b {
+                clr_b = false;
+                break;
+            }
+
+            if clr_b {
+                clr_str += &String::from(c);
+            }
+
+            if c == '&' && l_c == '<' {
+                clr_b = true;
+            }
+
+            l_c = c;
+        }
+        let mut _r: i16 = -1; let mut _g: i16 = -1; let mut _b: i16 = -1;
+
+        let str_len = clr_str.chars().count();
+
+        if str_len == 6 {
+            let r = i16::from_str_radix(&clr_str[0..2], 16).ok();
+            let g = i16::from_str_radix(&clr_str[2..4], 16).ok();
+            let b = i16::from_str_radix(&clr_str[4..6], 16).ok();
+
+            if !r.is_none() { _r = r.unwrap(); } else {
+                println!("{} {}", "Error: ".red(), "red color channel in encoded color string is null"); }
+            if !r.is_none() { _g = g.unwrap(); } else {
+                println!("{} {}", "Error: ".red(), "green color channel in encoded color string is null"); }
+            if !r.is_none() { _b = b.unwrap(); } else {
+                println!("{} {}", "Error: ".red(), "blue color channel in encoded color string is null"); }
+
+            if _r != -1 && _g != -1 && _b != -1 {
+                str = str.replace(
+                    &format!("<&{}>", clr_str),
+                        &"".color(_r, _g, _b).replace(ANSI_RESET, ""));
+            }
+        }
+
+        str + ANSI_RESET
+    }
+} 
\ No newline at end of file diff --git a/src/Ygen/Support/mod.rs.html b/src/Ygen/Support/mod.rs.html new file mode 100644 index 00000000..cfb16e25 --- /dev/null +++ b/src/Ygen/Support/mod.rs.html @@ -0,0 +1,70 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
mod color;
+mod cli;
+mod pad;
+mod srcmngr;
+mod tokmngr;
+
+use std::process::exit;
+
+pub use color::{Colorize, ColorEncoder};
+pub use cli::Cli;
+pub use pad::Pad;
+pub use srcmngr::SrcMngr;
+pub use tokmngr::TokenMgr;
+
+use crate::IR::VerifyError;
+
+/// Prints the error and exits the process
+/// If no error occured this function just returns
+pub trait PrintErrorAndExit {
+    /// Prints the error and exits the process
+    /// If no error occured this function just returns
+    fn print(&self);
+}
+
+impl PrintErrorAndExit for Result<(), VerifyError> {
+    fn print(&self) {
+        match self {
+            Ok(_) => {},
+            Err(e) => {
+                println!("{}", e);
+                exit(-1)
+            }
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Support/pad.rs.html b/src/Ygen/Support/pad.rs.html new file mode 100644 index 00000000..3bae8ad9 --- /dev/null +++ b/src/Ygen/Support/pad.rs.html @@ -0,0 +1,38 @@ +pad.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
/// A trait to pad strings
+pub trait Pad {
+    /// Pads the string to a spicific len (if the input string is longer than the len, the input string will be returned) 
+    fn pad_to_len(&mut self, len: isize) -> String;
+}
+
+impl Pad for String {
+    fn pad_to_len(&mut self, len: isize) -> String {
+        let str_len: isize = self.chars().count() as isize;
+
+        let diff = (len - str_len) as usize;
+
+        for _ in 0..diff {
+            self.push(' ');
+        }
+
+        self.to_string()
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Support/srcmngr.rs.html b/src/Ygen/Support/srcmngr.rs.html new file mode 100644 index 00000000..801dce5e --- /dev/null +++ b/src/Ygen/Support/srcmngr.rs.html @@ -0,0 +1,168 @@ +srcmngr.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
use std::{collections::HashMap, error::Error, fmt::Display};
+
+/// The Source Manager: easly chars out of a file 
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct SrcMngr {
+    srcFiles: HashMap</*name*/String, (/*content*/String, /*current line*/usize, /*current col*/usize)>,
+}
+
+/// An error which can occure in the Source Manager
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum SrcMngrError {
+    UnknownFile(String),
+}
+
+impl Display for SrcMngrError {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", match &self {
+            SrcMngrError::UnknownFile(name) => format!("unknown file: '{}'", name),
+        })
+    }
+}
+
+impl Error for SrcMngrError {}
+
+impl SrcMngr {
+    /// Creats a new SrcMngr
+    pub fn new() -> Self {
+        Self {
+            srcFiles: HashMap::new(),
+        }
+    }
+
+    /// Registers a new file
+    pub fn register(&mut self, name: String, content: String) {
+        self.srcFiles.insert(name, (content, 0, 0));
+    }
+
+    /// Returns the current char in the specified file
+    /// 
+    /// Also updates the current line and current colum in the file
+    pub fn get_next_char(&mut self, file: String) -> Result<Option<char>, SrcMngrError> {
+        if let Some((cont, _line, _col)) = self.srcFiles.get_mut(&file) {
+            let mut line = 0;
+            let mut col = 0;
+            let mut chr = None;
+
+            let mut iter = cont.chars().into_iter(); // not using chars_indicies cuz the _col is relative to the line not to the start of the file
+            for it_chr in iter.clone() { // clone original iter so we don't get used after already used error
+                iter.next(); // update original iter
+                if it_chr == '\n' {
+                    line += 1;
+                    col = 0;
+                };
+
+                if line == *_line && col == *_col {
+                    chr = Some(it_chr);
+                    break;
+                };
+
+                col = 0; 
+            };
+
+            if let Some('\n') = iter.next() {
+                *_line += 1;
+                *_col = 0;
+            }
+
+            Ok(chr)
+        } else {
+            Err( SrcMngrError::UnknownFile(file) )?
+        }
+    }
+
+    /// Returns the current position in the specified file
+    /// 
+    /// returns: `Result<(/*line*/usize, /*col*/usize), SrcMngrError>`
+    pub fn get_cur_pos(&self, file: String) -> Result<(/*line*/usize, /*col*/usize), SrcMngrError> {
+        if let Some((_, line, col)) = self.srcFiles.get(&file) {
+            Ok( (*line, *col) )
+        } else {
+            Err( SrcMngrError::UnknownFile(file) )?
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Support/tokmngr.rs.html b/src/Ygen/Support/tokmngr.rs.html new file mode 100644 index 00000000..6edc5038 --- /dev/null +++ b/src/Ygen/Support/tokmngr.rs.html @@ -0,0 +1,92 @@ +tokmngr.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+
use std::{ops::Range, error::Error};
+use super::SrcMngr;
+
+type TokenMgrCallback<T> = fn(&mut SrcMngr) -> Result<Option<(T, usize, Range<usize>)>, Box<dyn Error>>;
+
+/// ## The token manager
+/// You maybe asking for what is this usefull?
+/// It is very useful, for integrating line number information. Which helps by:
+///  * Printing errors in the sematic analasys
+///  * Including debug information 
+/// 
+/// ### Example
+/// 
+pub struct TokenMgr<T> {
+    token_vec: Vec<(T, /*lines*/usize, /*col*/Range<usize>)>,
+    callback: TokenMgrCallback<T>,
+}
+
+
+impl<T> TokenMgr<T> {
+    /// Creates a new token manager
+    pub fn new(callback: TokenMgrCallback<T>) -> Self {
+        Self {
+            token_vec: vec![],
+            callback: callback,
+        }
+    }
+
+    /// Sets the callback of the TokenMgr which is called for scanning each token
+    /// The input function type is like follows:
+    ///  `type TokenMgrCallback<T> = fn(&mut SrcMngr) -> Result<Option<(T, /*line*/usize, /*colums*/Range<usize>)>, Box<dyn Error>>;`
+    /// #### ! Important Note !
+    ///  The callback only scans one token
+    pub fn set_backend(&mut self, callback: TokenMgrCallback<T>) {
+        self.callback = callback; 
+    }
+
+
+    /// Scans all tokens of an specific input file
+    pub fn scan(&mut self, srcMngr: &mut SrcMngr) -> Result<(), Box<dyn Error>> {
+        while let Some((tok, line, cols)) = (self.callback)(srcMngr)? {
+            self.token_vec.push((tok, line, cols));
+        }
+        Ok(())
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Target/mod.rs.html b/src/Ygen/Target/mod.rs.html new file mode 100644 index 00000000..b98d806a --- /dev/null +++ b/src/Ygen/Target/mod.rs.html @@ -0,0 +1,584 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+
mod triple;
+mod registry;
+pub use triple::Triple;
+pub use registry::TargetRegistry;
+
+/// Target architecture
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Arch {
+    /// Unknown Architecture
+    Unknown,
+    /// Arm
+    Arm,
+    /// Arm eb
+    ArmEB,
+    /// Aarch 64
+    Aarch64,
+    /// Aarch64_be
+    Aarch64BE,
+    /// arc
+    Arc,
+    /// Avr
+    Avr,
+    /// Bpfel
+    Bpfel,
+    /// Bpfeb
+    Bpfeb,
+    /// Hexagon
+    Hexagon,
+    /// Mips
+    Mips,
+    /// Mipsel
+    Mipsel,
+    /// Mips64
+    Mips64,
+    /// Mips64EL
+    Mips64EL,
+    /// Msp420
+    Msp420,
+    /// Power Pc
+    Ppc,
+    /// Power PC 64
+    Ppc64,
+    /// Power PC 64 Little endian
+    Ppc64LE,
+    /// R600
+    R600,
+    /// Amd GCN
+    AmdGCN,
+    /// Riscv32
+    Riscv32,
+    /// Riscv64
+    Riscv64,
+    /// Sparc
+    Sparc,
+    /// Sparc v9
+    Sparcv9,
+    /// Sparcel
+    Sparcel,
+    /// SystemZ
+    SystemZ,
+    /// Tce
+    Tce,
+    /// Tce le
+    TceLe,
+    /// Thumb
+    Thumb,
+    /// Thumb EB
+    Thumbeb,
+    /// x86
+    X86,
+    /// x86 64Bit
+    X86_64,
+    /// Xcore
+    Xcore,
+    /// Nvptx
+    Nvptx,
+    /// Nvptx64
+    Nvptx64,
+    /// Le32
+    Le32,
+    /// Le64
+    Le64,
+    /// AmdIL
+    AmdIL,
+    /// AmdIL64
+    AmdIL64,
+    /// Hsail
+    Hsail,
+    /// Hsail64
+    Hsail64,
+    /// Spir
+    Spir,
+    /// Spir64
+    Spir64,
+    /// Kalimba
+    Kalimba,
+    /// Shave
+    Shave,
+    /// Lanai
+    Lanai,
+    /// Wasm32
+    Wasm32,
+    /// Wasm64
+    Wasm64,
+    /// RenderScript 32
+    Renderscript32,
+    /// RenderScript 64
+    Renderscript64,
+}
+
+/// Target calling convention
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum CallConv {
+    /// Windows standart
+    WindowsFastCall,
+    /// Linux standart
+    SystemV,
+}
+
+/// Vendor
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Vendor {
+    /// Unknown Vendor
+    Unknown,
+    /// Apple
+    Apple,
+    /// PC
+    Pc,
+    /// Scei
+    Scei,
+    /// Bgp
+    Bgp,
+    /// Freescale
+    Freescale,
+    /// Ibm
+    Ibm,
+    /// Imagination Technologies
+    ImaginationTechnologies,
+    /// Mips Technologies
+    MipsTechnologies,
+    /// Nvidia
+    Nvidia,
+    /// Csr
+    Csr,
+    /// Myriad
+    Myriad,
+    /// Amd
+    Amd,
+    /// Mesa
+    Mesa,
+    /// Suse
+    Suse,
+    /// Open Embedded
+    OpenEmbedded,
+}
+
+/// Target OS 
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum OS {
+    /// Unknown OS
+    Unknown,
+    /// Ananas
+    Ananas,
+    /// CloudABI
+    CloudABI,
+    /// Darwin
+    Darwin,
+    /// DragonFly
+    DragonFly,
+    /// FreeBSD
+    FreeBSD,
+    /// Fuchsia
+    Fuchsia,
+    /// IOS
+    Ios,
+    /// kFreeBSD
+    KFreeBSD,
+    /// Linux
+    Linux,
+    /// Lv2
+    Lv2,
+    /// MacOS
+    MacOS,
+    /// NetBSD
+    NetBSD,
+    /// OpenBSD
+    OpenBSD,
+    /// Solaris
+    Solaris,
+    /// Win32
+    Win32,
+    /// Haiku
+    Haiku,
+    /// Minix
+    Minix,
+    /// Rtems
+    Rtems,
+    /// NaCl
+    NaCl,
+    /// Cnk
+    Cnk,
+    /// Aix
+    Aix,
+    /// Cuda
+    Cuda,
+    /// Nvcl
+    Nvcl,
+    /// AmdHSA
+    AmdHSA,
+    /// Ps4
+    Ps4,
+    /// ElfIAMCU
+    ElfIAMCU,
+    /// TvOS
+    TvOS,
+    /// WatchOS
+    WatchOS,
+    /// Mesa3D
+    Mesa3D,
+    /// Contiki
+    Contiki,
+    /// AmdPAL
+    AmdPAL,
+    /// HermitCore
+    HermitCore,
+    /// Hurd
+    Hurd,
+    /// Wasi
+    Wasi,
+}
+
+/// Target environment
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Environment {
+    /// Unknown environment
+    Unknown,
+    /// Gnu
+    Gnu,
+    /// Gnu ABIN32
+    GnuABIN32,
+    /// Gnu ABI64
+    GnuABI64,
+    /// Gnu EABI
+    GnuEABI,
+    /// Gnu EABIHF
+    GnuEABIHF,
+    /// Gnu X32
+    GnuX32,
+    /// Code16
+    Code16,
+    /// EABI
+    Eabi,
+    /// EABIHF
+    EabiHF,
+    /// Android
+    Android,
+    /// Musl
+    Musl,
+    /// Musl EABI
+    MuslEABI,
+    /// Musl EABIHF
+    MuslEABIHF,
+    /// Msvc
+    Msvc,
+    /// Itanium
+    Itanium,
+    /// Cygnus
+    Cygnus,
+    /// Core CLR
+    CoreCLR,
+    /// Simulator
+    Simulator,
+}
+
+/// Target object format
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum ObjFormat {
+    /// Unknown 
+    Unknown,
+    /// Coff
+    Coff,
+    /// Elf
+    Elf,
+    /// MachO
+    MachO,
+    /// Wasm
+    Wasm,
+    /// Xcoff
+    XCoff,
+    /// Platforms default (e.g: Windows -> Coff)
+    Default
+}
\ No newline at end of file diff --git a/src/Ygen/Target/registry.rs.html b/src/Ygen/Target/registry.rs.html new file mode 100644 index 00000000..0ce04662 --- /dev/null +++ b/src/Ygen/Target/registry.rs.html @@ -0,0 +1,46 @@ +registry.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
use super::Arch;
+
+/// The Target Registry: stores if a target was already initialized
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct TargetRegistry {
+    inited_targets: Vec<Arch>,
+}
+
+impl TargetRegistry {
+    /// Creates a new instance
+    pub fn new() -> Self {
+        Self {
+            inited_targets: vec![],
+        }
+    }
+
+    /// Sets an architecture as initialized
+    pub fn set_inited(&mut self, arch: Arch) {
+        if !self.inited_targets.contains(&arch) {
+            self.inited_targets.push(arch);
+        }
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/Target/triple.rs.html b/src/Ygen/Target/triple.rs.html new file mode 100644 index 00000000..99ccf224 --- /dev/null +++ b/src/Ygen/Target/triple.rs.html @@ -0,0 +1,476 @@ +triple.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+
use std::{error::Error, fmt::Display};
+use crate::Support::Colorize;
+
+use super::*;
+
+/// The target triple
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub struct Triple {
+    /// The target architecture to use
+    pub arch: Arch,
+    /// The Vendor (If anyone knowns what this is please create an issue or a pr and fix the docs)
+    pub vendor: Vendor,
+    /// The target calling convention to use
+    pub os: OS,
+    /// The runtime environment
+    pub env: Environment,
+    /// Object format
+    pub bin: ObjFormat,
+}
+
+/// An error which can occure during parsing the target triple
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum TripleError {
+    /// An unknown architecture
+    UnkonwnArchitecture(String),
+    /// An operating system
+    UnknownOs(String),
+    /// An environment
+    UnknownEnv(String),
+    /// An unknown object file format
+    UnknownObj(String),
+}
+
+impl Display for TripleError {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{} {}", "Error:".bold().red(), {
+            match self {
+                TripleError::UnkonwnArchitecture(name) => format!("Unknown architecture: '{}'", name),
+                TripleError::UnknownOs(name) => format!("Unknown operating system: '{}'", name),
+                TripleError::UnknownEnv(name) => format!("Unknown environment (maybe unknown vendor cuz error handling isn't implemented the right way): '{}'", name),
+                TripleError::UnknownObj(name) => format!("Unknown object file format: '{}'", name),
+            }
+        })
+    }
+}
+
+impl Error for TripleError {}
+
+impl Triple {
+    /// Parses the target triple string. 
+    /// Returns the target triple or TripleError
+    pub fn parse(string: &str) -> Result<Triple, TripleError> {
+        let mut parts = string.split('-');
+
+        let mut arch: Arch = Arch::Unknown;
+
+        if let Some(archstr) = parts.next() {
+            arch = match archstr {
+                "unknown" => Arch::Unknown,
+                "arm" => Arch::Arm,
+                "aarch64" => Arch::Aarch64,
+                "aarch64_be" => Arch::Aarch64BE,
+                "arc" => Arch::Arc,
+                "avr" => Arch::Avr,
+                "bpfel" => Arch::Bpfel,
+                "bpfeb" => Arch::Bpfeb,
+                "hexagon" => Arch::Hexagon,
+                "mips" => Arch::Mips,
+                "mipsel" => Arch::Mipsel,
+                "mips64" => Arch::Mips64,
+                "mips64el" => Arch::Mips64EL,
+                "msp430" => Arch::Msp420,
+                "ppc" => Arch::Ppc,
+                "ppc64" => Arch::Ppc64,
+                "ppc64le" => Arch::Ppc64LE,
+                "r600" => Arch::R600,
+                "amdgcn" => Arch::AmdGCN,
+                "riscv32" => Arch::Riscv32,
+                "riscv64" => Arch::Riscv64,
+                "sparc" => Arch::Sparc,
+                "sparcv9" => Arch::Sparcv9,
+                "sparcel" => Arch::Sparcel,
+                "systemz" => Arch::SystemZ,
+                "tce" => Arch::Tce,
+                "thumb" => Arch::Thumb,
+                "thumbeb" => Arch::Thumbeb,
+                "x86" => Arch::X86,
+                "x86_64" => Arch::X86_64,
+                "xcore" => Arch::Xcore,
+                "nvptx" => Arch::Nvptx,
+                "nvptx64" => Arch::Nvptx64,
+                "le32" => Arch::Le32,
+                "le64" => Arch::Le64,
+                "amdil" => Arch::AmdIL,
+                "amdil64" => Arch::AmdIL64,
+                "hsail" => Arch::Hsail,
+                "hsail64" => Arch::Hsail64,
+                "spir" => Arch::Spir,
+                "spir64" => Arch::Spir64,
+                "kalimba" => Arch::Kalimba,
+                "shave" => Arch::Shave,
+                "lanai" => Arch::Lanai,
+                "wasm32" => Arch::Wasm32,
+                "wasm64" => Arch::Wasm64,
+                "renderscript32" => Arch::Renderscript32,
+                "renderscript64" => Arch::Renderscript64,
+                _ => Err( TripleError::UnkonwnArchitecture(archstr.to_string()))?,
+            };
+        }
+
+        let mut vendor: Vendor = Vendor::Unknown;
+
+        let mut has_vendor = true;
+
+        let mut curr = parts.next();
+
+        if let Some(vendorstr) = curr {
+            vendor = match vendorstr {
+                "unknown" => Vendor::Unknown,
+                "apple" => Vendor::Apple,
+                "pc" => Vendor::Pc,
+                "scei" => Vendor::Scei,
+                "bgp" => Vendor::Bgp,
+                "freescale" => Vendor::Freescale,
+                "ibm" => Vendor::Ibm,
+                "imaginationTechnologies" => Vendor::ImaginationTechnologies,
+                "mipsTechnologies" => Vendor::MipsTechnologies,
+                "nvidia" => Vendor::Nvidia,
+                "csr" => Vendor::Csr,
+                "myriad" => Vendor::Myriad,
+                "amd" => Vendor::Amd,
+                "mesa" => Vendor::Mesa,
+                "suse" => Vendor::Suse,
+                "openEmbedded" => Vendor::OpenEmbedded,
+                _ => {has_vendor = false; Vendor::Unknown},
+            };
+        }
+
+        if has_vendor { curr = parts.next(); }
+
+        let mut os: OS = OS::Unknown;
+
+        if let Some(osstr) = curr {
+            os = match osstr {
+                "unknown" => OS::Unknown,
+                "ananas" => OS::Ananas,
+                "cloudabi" => OS::CloudABI,
+                "darwin" => OS::Darwin,
+                "dragonfly" => OS::DragonFly,
+                "freeBSD" => OS::FreeBSD,
+                "fuchsia" => OS::Fuchsia,
+                "ios" => OS::Ios,
+                "kFreeBSD" => OS::KFreeBSD,
+                "linux" => OS::Linux,
+                "lv2" => OS::Lv2,
+                "macOS" => OS::MacOS,
+                "netBSD" => OS::NetBSD,
+                "openBSD" => OS::OpenBSD,
+                "solaris" => OS::Solaris,
+                "win32" => OS::Win32,
+                "windows" => OS::Win32,
+                "haiku" => OS::Haiku,
+                "minix" => OS::Minix,
+                "rtems" => OS::Rtems,
+                "naCL" => OS::NaCl,
+                "cnk" => OS::Cnk,
+                "aix" => OS::Aix,
+                "cuda" => OS::Cuda,
+                "nvcl" => OS::Nvcl,
+                "amdHSA" => OS::AmdHSA,
+                "Ps4" => OS::Ps4,
+                "ElfIAMCU" => OS::ElfIAMCU,
+                "tvOS" => OS::TvOS,
+                "watchOS" => OS::WatchOS,
+                "mesa3D" => OS::Mesa3D,
+                "contiki" => OS::Contiki,
+                "amdPAL" => OS::AmdPAL,
+                "hermitCore" => OS::HermitCore,
+                "hurd" => OS::Hurd,
+                "wasi" => OS::Wasi, 
+                _ => Err( TripleError::UnknownOs(osstr.to_string()) )?
+            };
+        }
+
+        let mut env = Environment::Unknown;
+
+        if let Some(envstr) = parts.next() {
+            env = match envstr {
+                "gnu" => Environment::Gnu,
+                "gnuABIN32" => Environment::GnuABIN32,
+                "gnuABI64" => Environment::GnuABI64,
+                "gnuEABI" => Environment::GnuEABI,
+                "gnuEABIHF" => Environment::GnuEABIHF,
+                "gnuX32" => Environment::GnuX32,
+                "code16" => Environment::Code16,
+                "eabi" => Environment::Eabi,
+                "eabiHF" => Environment::EabiHF,
+                "android" => Environment::Android,
+                "musl" => Environment::Musl,
+                "muslEABI" => Environment::MuslEABI,
+                "muslEABIHF" => Environment::MuslEABIHF,
+                "msvc" => Environment::Msvc,
+                "itanium" => Environment::Itanium,
+                "cygnus" => Environment::Cygnus,
+                "coreCLR" => Environment::CoreCLR,
+                "simulator" => Environment::Simulator,
+                _ => Err( TripleError::UnknownEnv(envstr.to_string()) )?,
+            };
+        }
+
+        let mut bin = ObjFormat::Default;
+
+        if let Some(binstr) = parts.next() {
+            bin = match binstr {
+                "unknown" => ObjFormat::Unknown,
+                "coff" => ObjFormat::Coff,
+                "elf" => ObjFormat::Elf,
+                "machO" => ObjFormat::MachO,
+                "wasm" => ObjFormat::Wasm,
+                "xcoff" => ObjFormat::XCoff,
+                _ => Err( TripleError::UnknownObj(binstr.to_string()) )?,
+            };
+        }
+
+        Ok(Triple {
+            arch: arch,
+            vendor: vendor,
+            os: os,
+            env: env,
+            bin: bin,
+        })
+    }
+
+    /// Just another name for the parse function
+    pub fn from(value: &str) -> Result<Triple, TripleError> {
+        Triple::parse(value)
+    }
+}
\ No newline at end of file diff --git a/src/Ygen/lib.rs.html b/src/Ygen/lib.rs.html new file mode 100644 index 00000000..1f48ad59 --- /dev/null +++ b/src/Ygen/lib.rs.html @@ -0,0 +1,77 @@ +lib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+
#![allow(non_snake_case)]
+#![warn(missing_docs)]
+#![warn(unreachable_pub)]
+#![allow(clippy::redundant_field_names)]
+#![allow(rustdoc::invalid_html_tags)]
+
+//! Ygen - <b>Y</b>et another Code <b>Gen</b>erator
+
+/// The target module: every stuff which has to do with targets. Like:
+///  * The target triple
+///  * TargetRegistry
+pub mod Target;
+
+/// The ir module: functions for building function ir
+pub mod IR;
+
+/// The pass manager module:
+///  * Includes all passes and their definition
+///  * The PassManager
+pub mod PassManager;
+
+/// Other utilites like:
+///  * Cli args
+///  * String coloring and padding
+pub mod Support;
+
+/// Writing/Reading object files
+pub mod Obj;
+
+/// Most common used functions, classes, enums of this Libary
+pub mod prelude {
+    pub use crate::IR::*;
+    pub use crate::Target::Triple;
+    pub use crate::Support::PrintErrorAndExit;
+    pub use crate::PassManager::PassManager;
+    
+    pub use crate::IR::ir::*;
+}
+
\ No newline at end of file diff --git a/src/ygen_mc/main.rs.html b/src/ygen_mc/main.rs.html new file mode 100644 index 00000000..95eace7f --- /dev/null +++ b/src/ygen_mc/main.rs.html @@ -0,0 +1,47 @@ +main.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
use Ygen::Support::Cli;
+
+fn main() {
+    let mut cli = Cli::new(
+        "ygen-mc", "Ygen's machine code playground", "1.0", "Cr0a3"
+    );
+
+    cli.add_opt("h", "help", "Displays help");
+    cli.add_opt("v", "version", "Displays the version");
+    cli.add_opt("clr", "color", "Colorates the ouput");
+    cli.add_arg("as", "assemble-string", "The assembly instruction to assemble", /*required*/ true);
+    cli.add_arg("triple", "triple", "The target triple", /*required*/ false);
+
+    cli.scan();
+
+    if cli.opt("h") {
+        cli.help();
+    } else if cli.opt("v") {
+        cli.version();
+    }
+
+    println!("string to assemble: {}", cli.arg_val("as").expect("we said it was required"));
+}
+
\ No newline at end of file diff --git a/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 00000000..1447df79 --- /dev/null +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 00000000..d7e9c149 --- /dev/null +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 00000000..7a1e5fc5 Binary files /dev/null and b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 00000000..e766e06c Binary files /dev/null and b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 00000000..1866ad4b Binary files /dev/null and b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 00000000..4b3edc29 --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 00000000..462c34ef Binary files /dev/null and b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 00000000..0d2941e1 --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 00000000..10b558e0 Binary files /dev/null and b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 00000000..5ec64eef Binary files /dev/null and b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 00000000..181a07f6 Binary files /dev/null and b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 00000000..2ae08a7b Binary files /dev/null and b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 00000000..175fa4f4 --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 00000000..0263fc30 Binary files /dev/null and b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/static.files/clipboard-24048e6d87f63d07.svg b/static.files/clipboard-24048e6d87f63d07.svg new file mode 100644 index 00000000..e437c83f --- /dev/null +++ b/static.files/clipboard-24048e6d87f63d07.svg @@ -0,0 +1 @@ + diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 00000000..8b34b511 --- /dev/null +++ b/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 00000000..69b8613c Binary files /dev/null and b/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/static.files/main-20a3ad099b048cf2.js b/static.files/main-20a3ad099b048cf2.js new file mode 100644 index 00000000..133116e4 --- /dev/null +++ b/static.files/main-20a3ad099b048cf2.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 00000000..469959f1 --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static.files/noscript-09095024cf37855e.css b/static.files/noscript-09095024cf37855e.css new file mode 100644 index 00000000..59786941 --- /dev/null +++ b/static.files/noscript-09095024cf37855e.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 00000000..62424d8f --- /dev/null +++ b/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-081576b923113409.css b/static.files/rustdoc-081576b923113409.css new file mode 100644 index 00000000..33b69caa --- /dev/null +++ b/static.files/rustdoc-081576b923113409.css @@ -0,0 +1,27 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('wheel-63255fc4502dca9a.svg');width:22px;height:22px;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('clipboard-24048e6d87f63d07.svg');}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/scrape-examples-ef1e698c1d417c0c.js b/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 00000000..ba830e37 --- /dev/null +++ b/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-bf21c90c8c1d92b1.js b/static.files/search-bf21c90c8c1d92b1.js new file mode 100644 index 00000000..81d04e0e --- /dev/null +++ b/static.files/search-bf21c90c8c1d92b1.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else{const isStringElem=parserState.userQuery[start]==="\"";if(isStringElem){start+=1;getStringElem(query,parserState,isInGenerics);end=parserState.pos-1}else{end=getIdentEndPosition(parserState)}if(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-charA,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 00000000..ab425fe4 --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-e66d777a5a92e9b2.js b/static.files/src-script-e66d777a5a92e9b2.js new file mode 100644 index 00000000..d0aebb85 --- /dev/null +++ b/static.files/src-script-e66d777a5a92e9b2.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true")};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar()}else{window.rustdocShowSourceSidebar()}};function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-e32f0c247825364d.js b/static.files/storage-e32f0c247825364d.js new file mode 100644 index 00000000..61ddce23 --- /dev/null +++ b/static.files/storage-e32f0c247825364d.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}}) \ No newline at end of file diff --git a/static.files/wheel-63255fc4502dca9a.svg b/static.files/wheel-63255fc4502dca9a.svg new file mode 100644 index 00000000..ba30f13d --- /dev/null +++ b/static.files/wheel-63255fc4502dca9a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/trait.impl/Ygen/IR/ir/trait.BuildAdd.js b/trait.impl/Ygen/IR/ir/trait.BuildAdd.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/IR/ir/trait.BuildAdd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/IR/ir/trait.BuildReturn.js b/trait.impl/Ygen/IR/ir/trait.BuildReturn.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/IR/ir/trait.BuildReturn.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/IR/ir/trait.Replace.js b/trait.impl/Ygen/IR/ir/trait.Replace.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/IR/ir/trait.Replace.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/PassManager/template/trait.Pass.js b/trait.impl/Ygen/PassManager/template/trait.Pass.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/PassManager/template/trait.Pass.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/Support/color/trait.Colorize.js b/trait.impl/Ygen/Support/color/trait.Colorize.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/Support/color/trait.Colorize.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/Support/pad/trait.Pad.js b/trait.impl/Ygen/Support/pad/trait.Pad.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/Support/pad/trait.Pad.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/Ygen/Support/trait.PrintErrorAndExit.js b/trait.impl/Ygen/Support/trait.PrintErrorAndExit.js new file mode 100644 index 00000000..ff49763c --- /dev/null +++ b/trait.impl/Ygen/Support/trait.PrintErrorAndExit.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 00000000..edb5e211 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Clone for Type"],["impl Clone for TypeMetadata"],["impl Clone for VerifyError"],["impl Clone for Decl"],["impl Clone for Linkage"],["impl Clone for Arch"],["impl Clone for CallConv"],["impl Clone for Environment"],["impl Clone for OS"],["impl Clone for ObjFormat"],["impl Clone for Vendor"],["impl Clone for Block"],["impl Clone for Function"],["impl Clone for FunctionType"],["impl Clone for Module"],["impl Clone for Var"],["impl Clone for Link"],["impl Clone for ObjectBuilder"],["impl Clone for SrcMngr"],["impl Clone for TargetRegistry"],["impl Clone for Triple"],["impl Clone for Box<dyn Ir>"],["impl<T: Clone, U: Clone> Clone for ConstAssign<T, U>"],["impl<T: Clone, U: Clone, Z: Clone> Clone for Add<T, U, Z>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 00000000..b4e2c31f --- /dev/null +++ b/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Eq for Type"],["impl Eq for TypeMetadata"],["impl Eq for VerifyError"],["impl Eq for Decl"],["impl Eq for Linkage"],["impl Eq for Arch"],["impl Eq for CallConv"],["impl Eq for Environment"],["impl Eq for OS"],["impl Eq for ObjFormat"],["impl Eq for Vendor"],["impl Eq for FunctionType"],["impl Eq for Var"],["impl Eq for Link"],["impl Eq for ObjectBuilder"],["impl Eq for SrcMngr"],["impl Eq for TargetRegistry"],["impl Eq for Triple"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 00000000..83a5fc1c --- /dev/null +++ b/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Ord for Type"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..9298dc3c --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl PartialEq for Type"],["impl PartialEq for TypeMetadata"],["impl PartialEq for VerifyError"],["impl PartialEq for Decl"],["impl PartialEq for Linkage"],["impl PartialEq for Arch"],["impl PartialEq for CallConv"],["impl PartialEq for Environment"],["impl PartialEq for OS"],["impl PartialEq for ObjFormat"],["impl PartialEq for Vendor"],["impl PartialEq for FunctionType"],["impl PartialEq for Var"],["impl PartialEq for Link"],["impl PartialEq for ObjectBuilder"],["impl PartialEq for SrcMngr"],["impl PartialEq for TargetRegistry"],["impl PartialEq for Triple"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 00000000..1099ff0a --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl PartialOrd for Type"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 00000000..cd4cd90f --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl From<Type> for TypeMetadata"],["impl From<TypeMetadata> for Type"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js new file mode 100644 index 00000000..4c45fe76 --- /dev/null +++ b/trait.impl/core/error/trait.Error.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Error for VerifyError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 00000000..77f3fab9 --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Debug for Type"],["impl Debug for TypeMetadata"],["impl Debug for VerifyError"],["impl Debug for Decl"],["impl Debug for Linkage"],["impl Debug for Arch"],["impl Debug for CallConv"],["impl Debug for Environment"],["impl Debug for OS"],["impl Debug for ObjFormat"],["impl Debug for Vendor"],["impl Debug for Block"],["impl Debug for Function"],["impl Debug for FunctionType"],["impl Debug for Module"],["impl Debug for Var"],["impl Debug for Link"],["impl Debug for ObjectBuilder"],["impl Debug for SrcMngr"],["impl Debug for TargetRegistry"],["impl Debug for Triple"],["impl<T: Debug, U: Debug> Debug for ConstAssign<T, U>"],["impl<T: Debug, U: Debug, Z: Debug> Debug for Add<T, U, Z>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 00000000..9ad33f46 --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Display for Type"],["impl Display for TypeMetadata"],["impl Display for VerifyError"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js new file mode 100644 index 00000000..9c457715 --- /dev/null +++ b/trait.impl/core/hash/trait.Hash.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Hash for Type"],["impl Hash for TypeMetadata"],["impl Hash for Var"],["impl<T: Hash, U: Hash> Hash for ConstAssign<T, U>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 00000000..07a92a9f --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Copy for Type"],["impl Copy for TypeMetadata"],["impl Copy for VerifyError"],["impl Copy for Decl"],["impl Copy for Linkage"],["impl Copy for Arch"],["impl Copy for CallConv"],["impl Copy for Environment"],["impl Copy for OS"],["impl Copy for ObjFormat"],["impl Copy for Vendor"],["impl Copy for Triple"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 00000000..16273c86 --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Freeze for Type",1,["Ygen::IR::typ::Type"]],["impl Freeze for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl Freeze for VerifyError",1,["Ygen::IR::VerifyError"]],["impl Freeze for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl Freeze for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl Freeze for Arch",1,["Ygen::Target::Arch"]],["impl Freeze for CallConv",1,["Ygen::Target::CallConv"]],["impl Freeze for Environment",1,["Ygen::Target::Environment"]],["impl Freeze for OS",1,["Ygen::Target::OS"]],["impl Freeze for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl Freeze for Vendor",1,["Ygen::Target::Vendor"]],["impl Freeze for Block",1,["Ygen::IR::block::Block"]],["impl Freeze for Function",1,["Ygen::IR::func::Function"]],["impl Freeze for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl Freeze for Module",1,["Ygen::IR::module::Module"]],["impl Freeze for Var",1,["Ygen::IR::var::Var"]],["impl Freeze for Link",1,["Ygen::Obj::wrapper::Link"]],["impl Freeze for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl Freeze for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl Freeze for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl Freeze for Cli",1,["Ygen::Support::cli::Cli"]],["impl Freeze for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl Freeze for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl Freeze for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl Freeze for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> Freeze for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> Freeze for TokenMgr<T>",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> Freeze for ConstAssign<T, U>
where\n T: Freeze,\n U: Freeze,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> Freeze for Add<T, U, Z>
where\n T: Freeze,\n U: Freeze,\n Z: Freeze,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 00000000..266176fe --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl !Send for Block",1,["Ygen::IR::block::Block"]],["impl !Send for Function",1,["Ygen::IR::func::Function"]],["impl !Send for Module",1,["Ygen::IR::module::Module"]],["impl !Send for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl Send for Type",1,["Ygen::IR::typ::Type"]],["impl Send for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl Send for VerifyError",1,["Ygen::IR::VerifyError"]],["impl Send for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl Send for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl Send for Arch",1,["Ygen::Target::Arch"]],["impl Send for CallConv",1,["Ygen::Target::CallConv"]],["impl Send for Environment",1,["Ygen::Target::Environment"]],["impl Send for OS",1,["Ygen::Target::OS"]],["impl Send for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl Send for Vendor",1,["Ygen::Target::Vendor"]],["impl Send for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl Send for Var",1,["Ygen::IR::var::Var"]],["impl Send for Link",1,["Ygen::Obj::wrapper::Link"]],["impl Send for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl Send for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl Send for Cli",1,["Ygen::Support::cli::Cli"]],["impl Send for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl Send for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl Send for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl Send for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> !Send for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> Send for TokenMgr<T>
where\n T: Send,
",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> Send for ConstAssign<T, U>
where\n T: Send,\n U: Send,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> Send for Add<T, U, Z>
where\n T: Send,\n U: Send,\n Z: Send,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 00000000..4c476ace --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl StructuralPartialEq for Type"],["impl StructuralPartialEq for TypeMetadata"],["impl StructuralPartialEq for VerifyError"],["impl StructuralPartialEq for Decl"],["impl StructuralPartialEq for Linkage"],["impl StructuralPartialEq for Arch"],["impl StructuralPartialEq for CallConv"],["impl StructuralPartialEq for Environment"],["impl StructuralPartialEq for OS"],["impl StructuralPartialEq for ObjFormat"],["impl StructuralPartialEq for Vendor"],["impl StructuralPartialEq for FunctionType"],["impl StructuralPartialEq for Var"],["impl StructuralPartialEq for Link"],["impl StructuralPartialEq for ObjectBuilder"],["impl StructuralPartialEq for SrcMngr"],["impl StructuralPartialEq for TargetRegistry"],["impl StructuralPartialEq for Triple"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 00000000..24268864 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl !Sync for Block",1,["Ygen::IR::block::Block"]],["impl !Sync for Function",1,["Ygen::IR::func::Function"]],["impl !Sync for Module",1,["Ygen::IR::module::Module"]],["impl !Sync for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl Sync for Type",1,["Ygen::IR::typ::Type"]],["impl Sync for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl Sync for VerifyError",1,["Ygen::IR::VerifyError"]],["impl Sync for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl Sync for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl Sync for Arch",1,["Ygen::Target::Arch"]],["impl Sync for CallConv",1,["Ygen::Target::CallConv"]],["impl Sync for Environment",1,["Ygen::Target::Environment"]],["impl Sync for OS",1,["Ygen::Target::OS"]],["impl Sync for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl Sync for Vendor",1,["Ygen::Target::Vendor"]],["impl Sync for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl Sync for Var",1,["Ygen::IR::var::Var"]],["impl Sync for Link",1,["Ygen::Obj::wrapper::Link"]],["impl Sync for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl Sync for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl Sync for Cli",1,["Ygen::Support::cli::Cli"]],["impl Sync for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl Sync for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl Sync for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl Sync for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> !Sync for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> Sync for TokenMgr<T>
where\n T: Sync,
",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> Sync for ConstAssign<T, U>
where\n T: Sync,\n U: Sync,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> Sync for Add<T, U, Z>
where\n T: Sync,\n U: Sync,\n Z: Sync,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 00000000..bfe8c0d7 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl Unpin for Type",1,["Ygen::IR::typ::Type"]],["impl Unpin for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl Unpin for VerifyError",1,["Ygen::IR::VerifyError"]],["impl Unpin for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl Unpin for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl Unpin for Arch",1,["Ygen::Target::Arch"]],["impl Unpin for CallConv",1,["Ygen::Target::CallConv"]],["impl Unpin for Environment",1,["Ygen::Target::Environment"]],["impl Unpin for OS",1,["Ygen::Target::OS"]],["impl Unpin for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl Unpin for Vendor",1,["Ygen::Target::Vendor"]],["impl Unpin for Block",1,["Ygen::IR::block::Block"]],["impl Unpin for Function",1,["Ygen::IR::func::Function"]],["impl Unpin for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl Unpin for Module",1,["Ygen::IR::module::Module"]],["impl Unpin for Var",1,["Ygen::IR::var::Var"]],["impl Unpin for Link",1,["Ygen::Obj::wrapper::Link"]],["impl Unpin for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl Unpin for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl Unpin for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl Unpin for Cli",1,["Ygen::Support::cli::Cli"]],["impl Unpin for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl Unpin for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl Unpin for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl Unpin for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> Unpin for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> Unpin for TokenMgr<T>
where\n T: Unpin,
",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> Unpin for ConstAssign<T, U>
where\n T: Unpin,\n U: Unpin,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> Unpin for Add<T, U, Z>
where\n T: Unpin,\n U: Unpin,\n Z: Unpin,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..2395c802 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl !RefUnwindSafe for Block",1,["Ygen::IR::block::Block"]],["impl !RefUnwindSafe for Function",1,["Ygen::IR::func::Function"]],["impl !RefUnwindSafe for Module",1,["Ygen::IR::module::Module"]],["impl !RefUnwindSafe for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl RefUnwindSafe for Type",1,["Ygen::IR::typ::Type"]],["impl RefUnwindSafe for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl RefUnwindSafe for VerifyError",1,["Ygen::IR::VerifyError"]],["impl RefUnwindSafe for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl RefUnwindSafe for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl RefUnwindSafe for Arch",1,["Ygen::Target::Arch"]],["impl RefUnwindSafe for CallConv",1,["Ygen::Target::CallConv"]],["impl RefUnwindSafe for Environment",1,["Ygen::Target::Environment"]],["impl RefUnwindSafe for OS",1,["Ygen::Target::OS"]],["impl RefUnwindSafe for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl RefUnwindSafe for Vendor",1,["Ygen::Target::Vendor"]],["impl RefUnwindSafe for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl RefUnwindSafe for Var",1,["Ygen::IR::var::Var"]],["impl RefUnwindSafe for Link",1,["Ygen::Obj::wrapper::Link"]],["impl RefUnwindSafe for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl RefUnwindSafe for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl RefUnwindSafe for Cli",1,["Ygen::Support::cli::Cli"]],["impl RefUnwindSafe for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl RefUnwindSafe for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl RefUnwindSafe for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl RefUnwindSafe for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> !RefUnwindSafe for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> RefUnwindSafe for TokenMgr<T>
where\n T: RefUnwindSafe,
",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> RefUnwindSafe for ConstAssign<T, U>
where\n T: RefUnwindSafe,\n U: RefUnwindSafe,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> RefUnwindSafe for Add<T, U, Z>
where\n T: RefUnwindSafe,\n U: RefUnwindSafe,\n Z: RefUnwindSafe,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..20449798 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"Ygen":[["impl !UnwindSafe for Block",1,["Ygen::IR::block::Block"]],["impl !UnwindSafe for Function",1,["Ygen::IR::func::Function"]],["impl !UnwindSafe for Module",1,["Ygen::IR::module::Module"]],["impl !UnwindSafe for PassManager",1,["Ygen::PassManager::mngr::PassManager"]],["impl UnwindSafe for Type",1,["Ygen::IR::typ::Type"]],["impl UnwindSafe for TypeMetadata",1,["Ygen::IR::typ::TypeMetadata"]],["impl UnwindSafe for VerifyError",1,["Ygen::IR::VerifyError"]],["impl UnwindSafe for Decl",1,["Ygen::Obj::wrapper::Decl"]],["impl UnwindSafe for Linkage",1,["Ygen::Obj::wrapper::Linkage"]],["impl UnwindSafe for Arch",1,["Ygen::Target::Arch"]],["impl UnwindSafe for CallConv",1,["Ygen::Target::CallConv"]],["impl UnwindSafe for Environment",1,["Ygen::Target::Environment"]],["impl UnwindSafe for OS",1,["Ygen::Target::OS"]],["impl UnwindSafe for ObjFormat",1,["Ygen::Target::ObjFormat"]],["impl UnwindSafe for Vendor",1,["Ygen::Target::Vendor"]],["impl UnwindSafe for FunctionType",1,["Ygen::IR::func::FunctionType"]],["impl UnwindSafe for Var",1,["Ygen::IR::var::Var"]],["impl UnwindSafe for Link",1,["Ygen::Obj::wrapper::Link"]],["impl UnwindSafe for ObjectBuilder",1,["Ygen::Obj::wrapper::ObjectBuilder"]],["impl UnwindSafe for PreComputeValue",1,["Ygen::PassManager::Passes::MathEval::PreComputeValue"]],["impl UnwindSafe for Cli",1,["Ygen::Support::cli::Cli"]],["impl UnwindSafe for ColorEncoder",1,["Ygen::Support::color::ColorEncoder"]],["impl UnwindSafe for SrcMngr",1,["Ygen::Support::srcmngr::SrcMngr"]],["impl UnwindSafe for TargetRegistry",1,["Ygen::Target::registry::TargetRegistry"]],["impl UnwindSafe for Triple",1,["Ygen::Target::triple::Triple"]],["impl<'a> !UnwindSafe for IRBuilder<'a>",1,["Ygen::IR::builder::IRBuilder"]],["impl<T> UnwindSafe for TokenMgr<T>
where\n T: UnwindSafe,
",1,["Ygen::Support::tokmngr::TokenMgr"]],["impl<T, U> UnwindSafe for ConstAssign<T, U>
where\n T: UnwindSafe,\n U: UnwindSafe,
",1,["Ygen::IR::ir::ConstAssign"]],["impl<T, U, Z> UnwindSafe for Add<T, U, Z>
where\n T: UnwindSafe,\n U: UnwindSafe,\n Z: UnwindSafe,
",1,["Ygen::IR::ir::Add"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/ygen_mc/all.html b/ygen_mc/all.html new file mode 100644 index 00000000..51bbb35a --- /dev/null +++ b/ygen_mc/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Functions

\ No newline at end of file diff --git a/ygen_mc/fn.main.html b/ygen_mc/fn.main.html new file mode 100644 index 00000000..d6811da0 --- /dev/null +++ b/ygen_mc/fn.main.html @@ -0,0 +1 @@ +main in ygen_mc - Rust

Function ygen_mc::main

source ·
pub(crate) fn main()
\ No newline at end of file diff --git a/ygen_mc/index.html b/ygen_mc/index.html new file mode 100644 index 00000000..8a84fadb --- /dev/null +++ b/ygen_mc/index.html @@ -0,0 +1 @@ +ygen_mc - Rust

Crate ygen_mc

source ·

Functions§

\ No newline at end of file diff --git a/ygen_mc/sidebar-items.js b/ygen_mc/sidebar-items.js new file mode 100644 index 00000000..9b556a05 --- /dev/null +++ b/ygen_mc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["main"]}; \ No newline at end of file