pub struct EnvironmentRegionProvider;Expand description
A region provider that loads region information from environment variables
This provider attempts to load the region from the LAGO_REGION environment variable
first, and falls back to LAGO_API_URL for custom endpoints. If neither is set,
it returns the default region.
Implementations§
Trait Implementations§
Source§impl Default for EnvironmentRegionProvider
impl Default for EnvironmentRegionProvider
Source§impl RegionProvider for EnvironmentRegionProvider
impl RegionProvider for EnvironmentRegionProvider
Source§fn provider_region(&self) -> Result<Region, LagoError>
fn provider_region(&self) -> Result<Region, LagoError>
Loads region information from environment variables
This method first checks the LAGO_REGION environment variable for predefined
regions (“us”, “eu”) or treats other values as custom endpoints.
If LAGO_REGION is not set, it falls back to LAGO_API_URL.
If neither is set, it returns the default region.
§Returns
A Result containing the determined Region
Auto Trait Implementations§
impl Freeze for EnvironmentRegionProvider
impl RefUnwindSafe for EnvironmentRegionProvider
impl Send for EnvironmentRegionProvider
impl Sync for EnvironmentRegionProvider
impl Unpin for EnvironmentRegionProvider
impl UnwindSafe for EnvironmentRegionProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more