Compiling some_rust_plugin1 v0.1.0 (C:\Users\kamil\Documents\OBS Plugins\some-rust-plugin1)
error[E0412]: cannot find type `ModuleRef` in this scope
--> src\lib.rs:14:14
|
14 | context: ModuleRef
| ^^^^^^^^^ help: a trait with a similar name exists: `Module`
|
::: C:\Users\kamil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\obs-wrapper-0.4.1\src\module.rs:67:1
|
67 | pub trait Module {
| ---------------- similarly named trait `Module` defined here
error[E0053]: method `new` has an incompatible type for trait
--> src\lib.rs:46:21
|
46 | fn new(context: dyn Module) -> Self {
| ^^^^^^^^^^
| |
| expected `ModuleContext`, found `dyn obs_wrapper::module::Module`
| help: change the parameter type to match the trait: `obs_wrapper::module::ModuleContext`
|
= note: expected signature `fn(obs_wrapper::module::ModuleContext) -> TestModule`
found signature `fn((dyn obs_wrapper::module::Module + 'static)) -> TestModule`
error[E0053]: method `get_ctx` has an incompatible type for trait
--> src\lib.rs:50:27
|
50 | fn get_ctx(&self) -> &dyn Module {
| ^^^^^^^^^^^
| |
| expected `ModuleContext`, found `dyn obs_wrapper::module::Module`
| help: change the output type to match the trait: `&obs_wrapper::module::ModuleContext`
|
= note: expected signature `fn(&TestModule) -> &obs_wrapper::module::ModuleContext`
found signature `fn(&TestModule) -> &dyn obs_wrapper::module::Module`
error[E0038]: the trait `obs_wrapper::module::Module` cannot be made into an object
--> src\lib.rs:46:21
|
46 | fn new(context: dyn Module) -> Self {
| ^^^^^^^^^^ `obs_wrapper::module::Module` cannot be made into an object
|
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> C:\Users\kamil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\obs-wrapper-0.4.1\src\module.rs:68:8
|
68 | fn new(ctx: ModuleContext) -> Self;
| ^^^ the trait cannot be made into an object because associated function `new` has no `self` parameter
...
75 | fn description() -> ObsString;
| ^^^^^^^^^^^ the trait cannot be made into an object because associated function `description` has no `self` parameter
76 | fn name() -> ObsString;
| ^^^^ the trait cannot be made into an object because associated function `name` has no `self` parameter
77 | fn author() -> ObsString;
| ^^^^^^ the trait cannot be made into an object because associated function `author` has no `self` parameter
= help: only type `TestModule` implements the trait, consider using it directly instead
error[E0038]: the trait `obs_wrapper::module::Module` cannot be made into an object
--> src\lib.rs:50:28
|
50 | fn get_ctx(&self) -> &dyn Module {
| ^^^^^^^^^^ `obs_wrapper::module::Module` cannot be made into an object
|
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
--> C:\Users\kamil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\obs-wrapper-0.4.1\src\module.rs:68:8
|
68 | fn new(ctx: ModuleContext) -> Self;
| ^^^ the trait cannot be made into an object because associated function `new` has no `self` parameter
...
75 | fn description() -> ObsString;
| ^^^^^^^^^^^ the trait cannot be made into an object because associated function `description` has no `self` parameter
76 | fn name() -> ObsString;
| ^^^^ the trait cannot be made into an object because associated function `name` has no `self` parameter
77 | fn author() -> ObsString;
| ^^^^^^ the trait cannot be made into an object because associated function `author` has no `self` parameter
= help: only type `TestModule` implements the trait, consider using it directly instead
error[E0599]: no variant or associated item named `Filter` found for enum `obs_wrapper::source::SourceType` in the current scope
--> src\lib.rs:28:21
|
28 | SourceType::Filter
| ^^^^^^
| |
| variant or associated item not found in `SourceType`
| help: there is a variant with a similar name: `FILTER`
|
note: if you're trying to build a new `obs_wrapper::source::SourceType`, consider using `obs_wrapper::source::SourceType::from_native` which returns `Option<obs_wrapper::source::SourceType>`
--> C:\Users\kamil\.cargo\registry\src\index.crates.io-6f17d22bba15001f\obs-wrapper-0.4.1\src\source\mod.rs:90:5
|
90 | pub(crate) fn from_native(source_type: obs_source_type) -> Option<SourceType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the size for values of type `(dyn obs_wrapper::module::Module + 'static)` cannot be known at compilation time
--> src\lib.rs:46:12
|
46 | fn new(context: dyn Module) -> Self {
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn obs_wrapper::module::Module + 'static)`
help: you can use `impl Trait` as the argument type
|
46 | fn new(context: impl Module) -> Self {
| ~~~~
help: function arguments must have a statically known size, borrowed types always have a known size
|
46 | fn new(context: &dyn Module) -> Self {
| +
error[E0599]: the method `as_mut` exists for enum `Option<TestModule>`, but its trait bounds were not satisfied
--> src\lib.rs:84:1
|
13 | struct TestModule {
| ----------------- doesn't satisfy `TestModule: Sized`
...
84 | obs_register_module!(TestModule);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Option<TestModule>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`{type error}: Sized`
which is required by `TestModule: Sized`
= note: this error originates in the macro `obs_register_module` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unused variable: `create`
--> src\lib.rs:31:15
|
31 | fn create(create: &mut CreatableSourceContext<Self>, source: SourceContext) -> Self {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_create`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `source`
--> src\lib.rs:31:58
|
31 | fn create(create: &mut CreatableSourceContext<Self>, source: SourceContext) -> Self {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_source`
Some errors have detailed explanations: E0038, E0053, E0277, E0412, E0599.
For more information about an error, try `rustc --explain E0038`.
warning: `some_rust_plugin1` (lib) generated 2 warnings
error: could not compile `some_rust_plugin1` (lib) due to 10 previous errors; 2 warnings emitted```
My Compiler logs