Struct tealr::TypeWalker

source ·
pub struct TypeWalker {
    pub given_types: Vec<TypeGenerator>,
    pub global_instances_off: Vec<GlobalInstance>,
    pub extra_page: Vec<ExtraPage>,
    /* private fields */
}
Expand description

This generates the .d.tl files

Fields§

§given_types: Vec<TypeGenerator>

All the types that are currently registered by the TypeWalker

§global_instances_off: Vec<GlobalInstance>

list of items that

§extra_page: Vec<ExtraPage>

list of extra pages that need to be generated.

Implementations§

source§

impl TypeWalker

source

pub fn new() -> Self

creates the TypeWalker

Examples found in repository?
examples/mlua/named_parameters.rs (line 30)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "test:example_method(\"field_1 is a string\", 3)";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
More examples
Hide additional examples
examples/rlua/named_parameters.rs (line 27)
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    tealr::rlu::rlua::Lua::new().context(|ctx| {
        let globals = ctx.globals();
        globals.set("test", Example {})?;
        let code = "test:example_method(\"field_1 is a string\", 3)";
        ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/manual_documentation.rs (line 93)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test.help())
print(\"----\")
print(test.help(\"example_method\"))
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";

    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/rlua/manual.rs (line 56)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    lua.context(|lua_ctx| {
        let globals = lua_ctx.globals();
        globals.set("test", Example {})?;
        let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";
        lua_ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/derive.rs (line 49)
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
fn main() -> Result<()> {
    //we collect the documentation of our API in a json file so `tealr_doc_gen` can generate
    //the online documentation
    let file_contents = TypeWalker::new()
        //tells it that we want to include the `Example` type
        //add more calls to process_type to generate more types in the same file
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
    ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/mlua/manual.rs (line 81)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);
    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test:example_method(function()return 1 end))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
print(\"Example field\", test.example_field)
test.example_field = 2
print(\"After modifying\",test.example_field)
        ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
source

pub fn add_page(self, name: String, content: String) -> Self

Adds a new page that should be included in the documentation

source

pub fn add_page_from( &mut self, name: String, location: impl AsRef<Path> ) -> Result<&mut Self, Error>

reads a file and adds it as an extra page

source

pub fn iter(&self) -> Iter<'_, TypeGenerator>

gives an iterator back over every type

source

pub fn process_type_inline<A: ToTypename + TypeBody>(self) -> Self

Process a type such that the body will be added directly into the module instead of becoming a child record.

When embedding teal/lua there is probably not really a reason to do so. However, it IS needed for the struct that gets exposed directly to teal when using mlua to make a lua/teal library.

source

pub fn process_type<A: ToTypename + TypeBody>(self) -> Self

prepares a type to have a .d.tl file generated, and adds it to the list of types to generate.

Examples found in repository?
examples/mlua/named_parameters.rs (line 33)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "test:example_method(\"field_1 is a string\", 3)";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
More examples
Hide additional examples
examples/rlua/named_parameters.rs (line 30)
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    tealr::rlu::rlua::Lua::new().context(|ctx| {
        let globals = ctx.globals();
        globals.set("test", Example {})?;
        let code = "test:example_method(\"field_1 is a string\", 3)";
        ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/manual_documentation.rs (line 96)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test.help())
print(\"----\")
print(test.help(\"example_method\"))
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";

    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/rlua/manual.rs (line 59)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    lua.context(|lua_ctx| {
        let globals = lua_ctx.globals();
        globals.set("test", Example {})?;
        let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";
        lua_ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/derive.rs (line 52)
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
fn main() -> Result<()> {
    //we collect the documentation of our API in a json file so `tealr_doc_gen` can generate
    //the online documentation
    let file_contents = TypeWalker::new()
        //tells it that we want to include the `Example` type
        //add more calls to process_type to generate more types in the same file
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
    ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/mlua/manual.rs (line 84)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);
    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test:example_method(function()return 1 end))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
print(\"Example field\", test.example_field)
test.example_field = 2
print(\"After modifying\",test.example_field)
        ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
source

pub fn generate( self, outer_name: &str, is_global: bool ) -> Result<String, FromUtf8Error>

👎Deprecated since 0.9.0: Generation of .d.tl files has been moved to tealr_doc_gen. Use TypeWaller::to_json() instead to get json parsable by tealr_doc_gen.

generates the .d.tl file. It outputs the string, its up to you to store it.

#[derive(UserData,ToTypename)]
struct Example {}
impl TealData for Example {}
let generated_string = TypeWalker::new().process_type::<Example>().generate("Examples",true);
assert_eq!(generated_string,Ok(String::from("global record Examples
\trecord Example
\t\tuserdata


\tend
end
return Examples"
)));
source

pub fn generate_global(self, outer_name: &str) -> Result<String, FromUtf8Error>

👎Deprecated since 0.9.0: Generation of .d.tl files has been moved to tealr_doc_gen. Use TypeWaller::to_json() instead to get json parsable by tealr_doc_gen.

Same as calling Typewalker::generate(outer_name,true).

#[derive(UserData,ToTypename)]
struct Example {}
impl TealData for Example {}
let generated_string = TypeWalker::new().process_type::<Example>().generate_global("Examples");
assert_eq!(generated_string,Ok(String::from("global record Examples
\trecord Example
\t\tuserdata


\tend
end
return Examples"
)));
source

pub fn generate_local(self, outer_name: &str) -> Result<String, FromUtf8Error>

👎Deprecated since 0.9.0: Generation of .d.tl files has been moved to tealr_doc_gen. Use TypeWaller::to_json() instead to get json parsable by tealr_doc_gen.

Same as calling Typewalker::generate(outer_name,false).

#[derive(UserData,ToTypename)]
struct Example {}
impl TealData for Example {}
let generated_string = TypeWalker::new().process_type::<Example>().generate_local("Examples");
assert_eq!(generated_string,Ok(String::from("local record Examples
\trecord Example
\t\tuserdata


\tend
end
return Examples"
)));
source

pub fn to_json(&self) -> Result<String>

Generates the json needed by tealr_doc_gen to generate the documentation.

It is up to you to store it properly

Examples found in repository?
examples/mlua/named_parameters.rs (line 35)
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "test:example_method(\"field_1 is a string\", 3)";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
More examples
Hide additional examples
examples/rlua/named_parameters.rs (line 32)
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //lua is still using position parameters as normal.
    tealr::rlu::rlua::Lua::new().context(|ctx| {
        let globals = ctx.globals();
        globals.set("test", Example {})?;
        let code = "test:example_method(\"field_1 is a string\", 3)";
        ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/manual_documentation.rs (line 98)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test.help())
print(\"----\")
print(test.help(\"example_method\"))
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";

    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/rlua/manual.rs (line 61)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    lua.context(|lua_ctx| {
        let globals = lua_ctx.globals();
        globals.set("test", Example {})?;
        let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
        ";
        lua_ctx.load(code).set_name("test?")?.eval()?;
        Ok(())
    })?;
    Ok(())
}
examples/mlua/derive.rs (line 54)
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
fn main() -> Result<()> {
    //we collect the documentation of our API in a json file so `tealr_doc_gen` can generate
    //the online documentation
    let file_contents = TypeWalker::new()
        //tells it that we want to include the `Example` type
        //add more calls to process_type to generate more types in the same file
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    let globals = lua.globals();
    globals.set("test", Example {})?;
    let code = "
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
    ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
examples/mlua/manual.rs (line 86)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that you want to include the Example type
        //chain extra calls to include more types
        .process_type::<Example>()
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");
    //normally you would now save the file somewhere.
    //however for this example we just print it.
    println!("{}\n ", file_contents);
    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();

    let globals = lua.globals();
    globals.set("test", Example(1))?;
    let code = "
print(test:example_method(function()return 1 end))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
print(\"Example field\", test.example_field)
test.example_field = 2
print(\"After modifying\",test.example_field)
        ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}
source

pub fn to_json_pretty(&self) -> Result<String>

Generates the json needed by tealr_doc_gen to generate the documentation in a pretty-printed way.

It is up to you to store it properly.

source

pub fn check_correct_version(&self) -> bool

Checks if the version of tealr to create this TypeWalker is the same version as the current tealr version

source

pub fn get_tealr_version_used(&self) -> &str

Gets the version of tealr that was used to create this TypeWalker

source§

impl TypeWalker

source

pub fn document_global_instance<T: ExportInstances>(self) -> Result<Self>

collect every instance that is getting shared with lua

Examples found in repository?
examples/mlua/userdata_proxy.rs (line 80)
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
fn main() -> Result<()> {
    let file_contents = TypeWalker::new()
        //tells it that we want to generate Example
        .process_type::<Example>()
        //generate the documentation for our proxy, allowing us to
        .process_type::<UserDataProxy<Example>>()
        // enable documenting the globals
        .document_global_instance::<Export>()?
        //generate the file
        .to_json()
        .expect("serde_json failed to serialize our data");

    //normally you would now save the file somewhere.
    println!("{}\n ", file_contents);

    //how you pass this type to lua hasn't changed:
    let lua = Lua::new();
    tealr::mlu::set_global_env(Export {}, &lua).unwrap();
    let globals = lua.globals();
    globals.set("test", Example { float: 42.0 })?;
    let code = "
print(\" Calling from `test` :\")
print(test:example_method(1))
print(test:example_method_mut(2,\"test\"))
print(test.example_function({}))
print(test.example_function_mut(true))
print(test.example_field)
print(test.example_static_field)
print(\" Calling from global `Example` :\")
print(Example.example_static_field)
print(Example.example_function({}))
    ";
    lua.load(code).set_name("test?").eval()?;
    Ok(())
}

Trait Implementations§

source§

impl Clone for TypeWalker

source§

fn clone(&self) -> TypeWalker

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 Default for TypeWalker

source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for TypeWalker

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for TypeWalker

source§

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

Serialize this value into the given Serde serializer. Read more

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> Serialize for T
where T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

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.
source§

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

source§

impl<T> MaybeSend for T