Skip to main content

azure_core/
macros.rs

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4/// Defines a static `Url`.
5#[macro_export]
6macro_rules! static_url {
7    ( $(#[$outer:meta])* $name:ident, $value:expr) => {
8        $(#[$outer])*
9        pub static $name: ::std::sync::LazyLock<$crate::http::Url> = ::std::sync::LazyLock::new(|| {
10            $crate::http::Url::parse($value).expect("hardcoded URL must parse")
11        });
12    };
13}