Updated stabliziation.
This commit is contained in:
parent
0f0bc55de6
commit
7fe36d8fd4
7 changed files with 18 additions and 19 deletions
|
@ -117,7 +117,7 @@ impl<T: IrcReader, U: IrcWriter> Connection<T, U> {
|
|||
}
|
||||
|
||||
/// Sends a Message over this connection.
|
||||
#[experimental = "Design is very new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "encode")]
|
||||
pub fn send<M: ToMessage>(&self, to_msg: M, encoding: &str) -> IoResult<()> {
|
||||
let encoding = match encoding_from_whatwg_label(encoding) {
|
||||
|
@ -143,7 +143,7 @@ impl<T: IrcReader, U: IrcWriter> Connection<T, U> {
|
|||
}
|
||||
|
||||
/// Sends a message over this connection.
|
||||
#[experimental = "Design is very new."]
|
||||
#[stable]
|
||||
#[cfg(not(feature = "encode"))]
|
||||
pub fn send<M: ToMessage>(&self, to_msg: M) -> IoResult<()> {
|
||||
let mut writer = self.writer.lock().unwrap();
|
||||
|
|
|
@ -203,7 +203,7 @@ pub enum Command<'a> {
|
|||
|
||||
// Capabilities extension to IRCv3
|
||||
/// CAP COMMAND :[param]
|
||||
#[experimental = "This command is not entirely specification compliant."]
|
||||
#[unstable = "This command is not entirely specification compliant."]
|
||||
CAP(CapSubCommand, Option<&'a str>),
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ impl Message {
|
|||
}
|
||||
|
||||
/// Gets the nickname of the message source, if it exists.
|
||||
#[experimental = "Feature is new."]
|
||||
#[stable]
|
||||
pub fn get_source_nickname(&self) -> Option<&str> {
|
||||
self.prefix.as_ref().and_then(|s| s.find('!').map(|i| &s[..i]))
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ impl FromStr for Message {
|
|||
}
|
||||
|
||||
/// A trait representing the ability to be converted into a Message.
|
||||
#[experimental = "Design is new."]
|
||||
#[stable]
|
||||
pub trait ToMessage {
|
||||
/// Converts this to a Message.
|
||||
fn to_message(&self) -> Message;
|
||||
|
|
|
@ -70,7 +70,7 @@ impl IrcServer<BufferedReader<NetStream>, BufferedWriter<NetStream>> {
|
|||
}
|
||||
|
||||
/// Reconnects to the IRC server.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
pub fn reconnect(&self) -> IoResult<()> {
|
||||
self.conn.reconnect(self.config().server(), self.config.port())
|
||||
}
|
||||
|
@ -253,10 +253,10 @@ pub struct ServerIterator<'a, T: IrcReader, U: IrcWriter> {
|
|||
server: &'a IrcServer<T, U>
|
||||
}
|
||||
|
||||
#[experimental = "Design is liable to change to accomodate new functionality."]
|
||||
#[unstable = "Design is liable to change to accomodate new functionality."]
|
||||
impl<'a, T: IrcReader, U: IrcWriter> ServerIterator<'a, T, U> {
|
||||
/// Creates a new ServerIterator for the desired IrcServer.
|
||||
#[experimental = "Design is liable to change to accomodate new functionality."]
|
||||
#[unstable = "Design is liable to change to accomodate new functionality."]
|
||||
pub fn new(server: &IrcServer<T, U>) -> ServerIterator<T, U> {
|
||||
ServerIterator { server: server }
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ impl<'a, T: IrcReader, U: IrcWriter> ServerIterator<'a, T, U> {
|
|||
}
|
||||
|
||||
impl<'a, T: IrcReader, U: IrcWriter> Iterator for ServerIterator<'a, T, U> {
|
||||
#[unstable = "Design changed fairly recently."]
|
||||
#[stable]
|
||||
type Item = IoResult<Message>;
|
||||
fn next(&mut self) -> Option<IoResult<Message>> {
|
||||
let res = self.get_next_line().and_then(|msg|
|
||||
|
|
|
@ -169,7 +169,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a CTCP-escaped message to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_ctcp(&self, target: &str, msg: &str) -> IoResult<()> {
|
||||
self.send_privmsg(target, &format!("\u{001}{}\u{001}", msg)[])
|
||||
|
@ -177,7 +177,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends an action command to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_action(&self, target: &str, msg: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, &format!("ACTION {}", msg)[])
|
||||
|
@ -185,7 +185,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a finger request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_finger(&self, target: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, "FINGER")
|
||||
|
@ -193,7 +193,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a version request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_version(&self, target: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, "VERSION")
|
||||
|
@ -201,7 +201,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a source request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_source(&self, target: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, "SOURCE")
|
||||
|
@ -209,7 +209,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a user info request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_user_info(&self, target: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, "USERINFO")
|
||||
|
@ -217,7 +217,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a finger request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_ctcp_ping(&self, target: &str) -> IoResult<()> {
|
||||
let time = get_time();
|
||||
|
@ -226,7 +226,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
|
|||
|
||||
/// Sends a time request to the specified target.
|
||||
/// This requires the CTCP feature to be enabled.
|
||||
#[unstable = "Feature is relatively new."]
|
||||
#[stable]
|
||||
#[cfg(feature = "ctcp")]
|
||||
pub fn send_time(&self, target: &str) -> IoResult<()> {
|
||||
self.send_ctcp(target, "TIME")
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#![crate_name = "irc"]
|
||||
#![crate_type = "lib"]
|
||||
#![unstable]
|
||||
#![allow(unstable)]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#![feature(slicing_syntax)]
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
//! A simple, thread-safe IRC server library.
|
||||
#![experimental]
|
||||
#![unstable = "This has yet to be written."]
|
||||
|
|
Loading…
Add table
Reference in a new issue