-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cfe7bb
commit 54c7e22
Showing
8 changed files
with
40 additions
and
7,455 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[doc(hidden)] | ||
#[macro_export] | ||
macro_rules! msg_impl { | ||
() => { | ||
/// Append a message to the existing error message. | ||
/// | ||
/// That means, the new message will be: `old_message` + `message`. | ||
pub fn append_msg(&mut self, message: &str) { | ||
let mut s = String::with_capacity(self.message.len() + message.len()); | ||
s.push_str(self.message.as_str()); | ||
s.push_str(message); | ||
self.message = s.into(); | ||
} | ||
|
||
/// Prepend a message to the existing error message. | ||
/// | ||
/// That means, the new message will be: `message` + `old_message`. | ||
pub fn prepend_msg(&mut self, message: &str) { | ||
let mut s = String::with_capacity(self.message.len() + message.len()); | ||
s.push_str(message); | ||
s.push_str(self.message.as_str()); | ||
self.message = s.into(); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
mod application; | ||
mod macros; | ||
mod protocol; | ||
mod transport; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters