Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. fn main() {
  2.  
  3. }
  4.  
  5. impl<'a> FileResp {
  6. fn into_download_param(&self, fp: &FileParam<'a>) -> DownloadParam<'a> {
  7. DownloadParam {
  8. foo: &self.foo,
  9. bar: fp.bar,
  10. }
  11. }
  12. }
  13.  
  14. struct DownloadParam<'a> {
  15. foo: &'a str,
  16. bar: &'a str,
  17. }
  18.  
  19. struct FileResp {
  20. foo: String,
  21. }
  22.  
  23. struct FileParam<'a> {
  24. bar: &'a str,
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement