pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://doc.rust-lang.org/../cargo/reference/../reference/../../std/macro.option_env.html

aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>``).join(""))

option_env

Macro option_env 

1.38.0 · Source
macro_rules! option_env {
    ($name:expr $(,)?) => { ... };
}
Expand description

Optionally inspects an environment variable at compile time.

If the named environment variable is present at compile time, this will expand into an expression of type Option<&'static str> whose value is Some of the value of the environment variable (a compilation error will be emitted if the environment variable is not a valid Unicode string). If the environment variable is not present, then this will expand to None. See Option<T> for more information on this type. Use std::env::var instead if you want to read the value at runtime.

A compile time error is only emitted when using this macro if the environment variable exists and is not a valid Unicode string. To also emit a compile error if the environment variable is not present, use the env! macro instead.

§Examples

let key: Option<&'static str> = option_env!("SECRET_KEY");
println!("the secret key might be: {key:?}");
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy