Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

Commit 6b99c5f

Browse files
committed
Merge pull request #4 from MindFlavor/candidate
added list blobs, get blob and put blob
2 parents 79c18dd + 455eae2 commit 6b99c5f

14 files changed

+716
-222
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target
22
*.rs.bk
33
.vscode
4-
sample/
4+
sample/
5+
/.project

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Change Log
2+
3+
## [v0.0.5](https://github.com/MindFlavor/AzureSDKForRust/releases/tag/v0.0.5) (2016-01-05)
4+
5+
**Implemented features:**
6+
* List blobs
7+
* Get blob
8+
* Put blob
9+
10+
## [v0.0.4](https://github.com/MindFlavor/AzureSDKForRust/releases/tag/v0.0.4) (2015-12-15)
11+
12+
**Implemented features:**
13+
* Create container
14+
* Delete container
15+
16+
## [v0.0.3](https://github.com/MindFlavor/AzureSDKForRust/releases/tag/v0.0.3) (2015-12-14)
17+
18+
Initial release
19+
20+
**Implemented features:**
21+
* Shared key authentication
22+
* List containers

Cargo.lock

+120-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
[package]
22
name = "azure_sdk_for_rust"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
authors = ["Francesco Cogno <francesco.cogno@outlook.com>"]
55

66
[dependencies]
77
chrono = "*"
88
rust-crypto = "^0.2"
99
rustc-serialize = "*"
1010
RustyXML = "*"
11+
mime = "*"
1112

1213
[dependencies.hyper]
1314
version = "*"
14-
default-features = false
15+
default-features = true
1516

1617
[dependencies.url]
1718
git = "https://github.com/servo/rust-url"

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ If you want to contribute please do! No formality required! :wink:
6666
|Method | URL |
6767
| ---- | --- |
6868
|List blobs|[https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx]()|
69+
|Get blob|[https://msdn.microsoft.com/en-us/library/azure/dd179440.aspx]()|
70+
|Put blob|[https://msdn.microsoft.com/en-us/library/azure/dd179451.aspx]()|
6971

7072
## License
7173
This project is published under [The MIT License (MIT)](LICENSE).

src/azure/core/enumerations.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ macro_rules! create_enum {
3838

3939
impl fmt::Display for $en {
4040
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
41-
match self {
41+
match *self {
4242
$(
43-
&$en::$na => write!(f, "{}", $x),
43+
$en::$na => write!(f, "{}", $x),
4444
)*
4545
}
4646
}

src/azure/core/errors.rs

+22
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ pub enum AzureError {
1414
IOError(String),
1515
XMLError(String),
1616
UnexpectedResult((StatusCode, StatusCode, String)),
17+
HeaderNotFound(String),
1718
ResponseParsingError(TraversingError),
1819
ParseIntError(num::ParseIntError),
1920
ParseError(ParseError),
21+
GenericError,
22+
ParsingError(ParsingError),
23+
InputParametersError(String),
2024
}
2125

2226
#[derive(Debug)]
@@ -37,12 +41,24 @@ impl From<ParseError> for AzureError {
3741
}
3842
}
3943

44+
impl From<()> for AzureError {
45+
fn from(_: ()) -> AzureError {
46+
AzureError::GenericError
47+
}
48+
}
49+
4050
impl From<hyper::error::Error> for AzureError {
4151
fn from(he: hyper::error::Error) -> AzureError {
4252
AzureError::HyperError(he)
4353
}
4454
}
4555

56+
impl From<ParsingError> for AzureError {
57+
fn from(pie: ParsingError) -> AzureError {
58+
AzureError::ParsingError(pie)
59+
}
60+
}
61+
4662
impl From<chrono::format::ParseError> for AzureError {
4763
fn from(pe: chrono::format::ParseError) -> AzureError {
4864
AzureError::ResponseParsingError(TraversingError::DateTimeParseError(pe))
@@ -73,6 +89,12 @@ impl From<num::ParseIntError> for TraversingError {
7389
}
7490
}
7591

92+
impl From<ParsingError> for TraversingError {
93+
fn from(pie: ParsingError) -> TraversingError {
94+
TraversingError::ParsingError(pie)
95+
}
96+
}
97+
7698

7799
pub fn new_from_xmlerror_string(s: String) -> AzureError {
78100
AzureError::XMLError(s)

src/azure/core/incompletevector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::ops::Index;
1+
// use std::ops::Index;
22

33
#[derive(Debug)]
44
pub struct IncompleteVector<T> {

0 commit comments

Comments
 (0)