Updated stabliziation.

This commit is contained in:
Aaron Weiss 2015-01-30 11:50:03 -05:00
parent 0f0bc55de6
commit 7fe36d8fd4
7 changed files with 18 additions and 19 deletions

View file

@ -117,7 +117,7 @@ impl<T: IrcReader, U: IrcWriter> Connection<T, U> {
} }
/// Sends a Message over this connection. /// Sends a Message over this connection.
#[experimental = "Design is very new."] #[stable]
#[cfg(feature = "encode")] #[cfg(feature = "encode")]
pub fn send<M: ToMessage>(&self, to_msg: M, encoding: &str) -> IoResult<()> { pub fn send<M: ToMessage>(&self, to_msg: M, encoding: &str) -> IoResult<()> {
let encoding = match encoding_from_whatwg_label(encoding) { 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. /// Sends a message over this connection.
#[experimental = "Design is very new."] #[stable]
#[cfg(not(feature = "encode"))] #[cfg(not(feature = "encode"))]
pub fn send<M: ToMessage>(&self, to_msg: M) -> IoResult<()> { pub fn send<M: ToMessage>(&self, to_msg: M) -> IoResult<()> {
let mut writer = self.writer.lock().unwrap(); let mut writer = self.writer.lock().unwrap();

View file

@ -203,7 +203,7 @@ pub enum Command<'a> {
// Capabilities extension to IRCv3 // Capabilities extension to IRCv3
/// CAP COMMAND :[param] /// CAP COMMAND :[param]
#[experimental = "This command is not entirely specification compliant."] #[unstable = "This command is not entirely specification compliant."]
CAP(CapSubCommand, Option<&'a str>), CAP(CapSubCommand, Option<&'a str>),
} }

View file

@ -37,7 +37,7 @@ impl Message {
} }
/// Gets the nickname of the message source, if it exists. /// Gets the nickname of the message source, if it exists.
#[experimental = "Feature is new."] #[stable]
pub fn get_source_nickname(&self) -> Option<&str> { pub fn get_source_nickname(&self) -> Option<&str> {
self.prefix.as_ref().and_then(|s| s.find('!').map(|i| &s[..i])) 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. /// A trait representing the ability to be converted into a Message.
#[experimental = "Design is new."] #[stable]
pub trait ToMessage { pub trait ToMessage {
/// Converts this to a Message. /// Converts this to a Message.
fn to_message(&self) -> Message; fn to_message(&self) -> Message;

View file

@ -70,7 +70,7 @@ impl IrcServer<BufferedReader<NetStream>, BufferedWriter<NetStream>> {
} }
/// Reconnects to the IRC server. /// Reconnects to the IRC server.
#[unstable = "Feature is relatively new."] #[stable]
pub fn reconnect(&self) -> IoResult<()> { pub fn reconnect(&self) -> IoResult<()> {
self.conn.reconnect(self.config().server(), self.config.port()) 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> 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> { impl<'a, T: IrcReader, U: IrcWriter> ServerIterator<'a, T, U> {
/// Creates a new ServerIterator for the desired IrcServer. /// 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> { pub fn new(server: &IrcServer<T, U>) -> ServerIterator<T, U> {
ServerIterator { server: server } 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> { impl<'a, T: IrcReader, U: IrcWriter> Iterator for ServerIterator<'a, T, U> {
#[unstable = "Design changed fairly recently."] #[stable]
type Item = IoResult<Message>; type Item = IoResult<Message>;
fn next(&mut self) -> Option<IoResult<Message>> { fn next(&mut self) -> Option<IoResult<Message>> {
let res = self.get_next_line().and_then(|msg| let res = self.get_next_line().and_then(|msg|

View file

@ -169,7 +169,7 @@ impl<'a, T: IrcReader, U: IrcWriter> Wrapper<'a, T, U> {
/// Sends a CTCP-escaped message to the specified target. /// Sends a CTCP-escaped message to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_ctcp(&self, target: &str, msg: &str) -> IoResult<()> { pub fn send_ctcp(&self, target: &str, msg: &str) -> IoResult<()> {
self.send_privmsg(target, &format!("\u{001}{}\u{001}", msg)[]) 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. /// Sends an action command to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_action(&self, target: &str, msg: &str) -> IoResult<()> { pub fn send_action(&self, target: &str, msg: &str) -> IoResult<()> {
self.send_ctcp(target, &format!("ACTION {}", msg)[]) 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. /// Sends a finger request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_finger(&self, target: &str) -> IoResult<()> { pub fn send_finger(&self, target: &str) -> IoResult<()> {
self.send_ctcp(target, "FINGER") 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. /// Sends a version request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_version(&self, target: &str) -> IoResult<()> { pub fn send_version(&self, target: &str) -> IoResult<()> {
self.send_ctcp(target, "VERSION") 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. /// Sends a source request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_source(&self, target: &str) -> IoResult<()> { pub fn send_source(&self, target: &str) -> IoResult<()> {
self.send_ctcp(target, "SOURCE") 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. /// Sends a user info request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_user_info(&self, target: &str) -> IoResult<()> { pub fn send_user_info(&self, target: &str) -> IoResult<()> {
self.send_ctcp(target, "USERINFO") 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. /// Sends a finger request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_ctcp_ping(&self, target: &str) -> IoResult<()> { pub fn send_ctcp_ping(&self, target: &str) -> IoResult<()> {
let time = get_time(); 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. /// Sends a time request to the specified target.
/// This requires the CTCP feature to be enabled. /// This requires the CTCP feature to be enabled.
#[unstable = "Feature is relatively new."] #[stable]
#[cfg(feature = "ctcp")] #[cfg(feature = "ctcp")]
pub fn send_time(&self, target: &str) -> IoResult<()> { pub fn send_time(&self, target: &str) -> IoResult<()> {
self.send_ctcp(target, "TIME") self.send_ctcp(target, "TIME")

View file

@ -2,7 +2,6 @@
#![crate_name = "irc"] #![crate_name = "irc"]
#![crate_type = "lib"] #![crate_type = "lib"]
#![unstable] #![unstable]
#![allow(unstable)]
#![warn(missing_docs)] #![warn(missing_docs)]
#![feature(slicing_syntax)] #![feature(slicing_syntax)]

View file

@ -1,2 +1,2 @@
//! A simple, thread-safe IRC server library. //! A simple, thread-safe IRC server library.
#![experimental] #![unstable = "This has yet to be written."]