microsoft-cognitive-computer-vision 0.1.0

Microsoft - Cognitive Services - Computer Vision API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Debug, Clone)]
pub enum EndpointUrl {
    ResourceName(String),
    WestUS,
}

impl EndpointUrl {
    pub fn url(&self) -> String {
        match self {
            EndpointUrl::ResourceName(name) => {
                format!("https://{}.cognitiveservices.azure.com/", name)
            }
            EndpointUrl::WestUS => "https://westus.api.cognitive.microsoft.com/".to_owned(),
        }
    }
}