|
@@ -92,15 +92,9 @@ impl<'a> Socket<'a> {
|
|
|
|
|
|
/// A conversion trait for network sockets.
|
|
|
pub trait AnySocket<'a> {
|
|
|
- fn upcast(self) -> Socket<'a>
|
|
|
- where
|
|
|
- Self: Sized;
|
|
|
- fn downcast<'c>(socket: &'c Socket<'a>) -> Option<&'c Self>
|
|
|
- where
|
|
|
- Self: Sized;
|
|
|
- fn downcast_mut<'c>(socket: &'c mut Socket<'a>) -> Option<&'c mut Self>
|
|
|
- where
|
|
|
- Self: Sized;
|
|
|
+ fn upcast(self) -> Socket<'a>;
|
|
|
+ fn downcast<'c>(socket: &'c Socket<'a>) -> Option<&'c Self>;
|
|
|
+ fn downcast_mut<'c>(socket: &'c mut Socket<'a>) -> Option<&'c mut Self>;
|
|
|
}
|
|
|
|
|
|
macro_rules! from_socket {
|