Updating Client and Service

Update the client and server code to account for the new API.

birthday_service/src/lib.rs:

1. impl IBirthdayService for BirthdayService {
2. fn wishHappyBirthday(
3. &self,
4. name: &str,
5. years: i32,
6. text: &[String],
7. ) -> binder::Result<String> {
8. let mut msg = format!(
9. "Happy Birthday {name}, congratulations with the {years} years!",
10. );

12. for line in text {
13. msg.push('\n');
14. msg.push_str(line);
15. }

17. Ok(msg)
18. }
19. }

birthday_service/src/client.rs:

1. let msg = service.wishHappyBirthday(
2. &name,
3. years,
4. &[
5. String::from("Habby birfday to yuuuuu"),
6. String::from("And also: many more"),
7. ],
8. )?;
  • TODO: Move code snippets into project files where they’ll actually be built?