Macro sp_std::if_std [−][src]
macro_rules! if_std { ( $( $code:tt )* ) => { ... }; }
Expand description
Feature gate some code that should only be run when std
feature is enabled.
Example
use sp_std::if_std; if_std! { // This code is only being compiled and executed when the `std` feature is enabled. println!("Hello native world"); }