Created
June 26, 2020 22:28
-
-
Save ctaggart/60b898fdbb37c72407d02486f5bed8d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
impl AsRef<OutgoingMessage> for ServerResponse { | |
fn as_ref(&self) -> &OutgoingMessage { | |
self.unchecked_ref() | |
} | |
} | |
impl From<ServerResponse> for OutgoingMessage { | |
fn from(child: ServerResponse) -> Self { | |
child.unchecked_into() | |
} | |
} | |
impl ServerResponse { | |
pub fn to_outgoing_message(self) -> OutgoingMessage { | |
self.unchecked_into() | |
} | |
pub fn as_outgoing_message(&self) -> &OutgoingMessage { | |
self.unchecked_ref() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment