You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should notice that the value created from `lazy_static_include_bytes` and `lazy_static_include_str` macros isn't equal to `&'static [u8]` or `&'static str`. If you want to get an exact `&'static [u8]` or `&'static str` reference, you can **dereference** the value.
51
57
52
58
```rust
53
-
#[macro_use] externcratelazy_static_include;
59
+
uselazy_static_include::*;
54
60
55
61
lazy_static_include_bytes! {
56
62
/// doc
@@ -60,6 +66,8 @@ lazy_static_include_bytes! {
60
66
letdata:&'static [u8] =*TEST;
61
67
```
62
68
69
+
Also, private items (without `pub`) and public items (with `pub*`) cannot be put together.
70
+
63
71
## Include Array
64
72
65
73
There is a special macro `lazy_static_include_array` which can include arrays from files.
@@ -71,11 +79,14 @@ Be careful when you distribute your program.
71
79
The paths used for `lazy_static_include_array` are relative to **CARGO_MANIFEST_DIR**.
You should notice that the value created from `lazy_static_include_bytes` and `lazy_static_include_str` macros isn't equal to `&'static [u8]` or `&'static str`. If you want to get an exact `&'static [u8]` or `&'static str` reference, you can **dereference** the value.
49
55
50
56
```rust
51
-
#[macro_use] extern crate lazy_static_include;
57
+
use lazy_static_include::*;
52
58
53
59
lazy_static_include_bytes! {
54
60
/// doc
@@ -58,6 +64,8 @@ lazy_static_include_bytes! {
58
64
let data: &'static [u8] = *TEST;
59
65
```
60
66
67
+
Also, private items (without `pub`) and public items (with `pub*`) cannot be put together.
68
+
61
69
## Include Array
62
70
63
71
There is a special macro `lazy_static_include_array` which can include arrays from files.
@@ -69,11 +77,14 @@ Be careful when you distribute your program.
69
77
The paths used for `lazy_static_include_array` are relative to **CARGO_MANIFEST_DIR**.
0 commit comments