latch-core 0.1.0

Neutral shared types and configuration for the Latch gateway SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
pub enum RouteTarget {
    NamedPool(String),
    BackendUrl(String),
}

impl RouteTarget {
    pub fn as_str(&self) -> &str {
        match self {
            RouteTarget::NamedPool(v) | RouteTarget::BackendUrl(v) => v,
        }
    }
}