fn accept_ownership_invitation(&self, krate_name: &str, krate_id: i32) {
        let body = json!({
            "crate_owner_invite": {
                "invited_by_username": "",
                "crate_name": krate_name,
                "crate_id": krate_id,
                "created_at": "",
                "accepted": true
            }
        });

        #[derive(Deserialize)]
        struct CrateOwnerInvitation {
            crate_owner_invitation: InvitationResponse,
        }

        let url = format!("/api/v1/me/crate_owner_invitations/{}", krate_id);
        let crate_owner_invite: CrateOwnerInvitation =
            self.put(&url, body.to_string().as_bytes()).good();
        assert!(crate_owner_invite.crate_owner_invitation.accepted);
        assert_eq!(crate_owner_invite.crate_owner_invitation.crate_id, krate_id);
    }
/// As the currently logged in user, accept an invitation to become an owner of the named
/// crate.
As the currently logged in user, accept an invitation to become an owner of the named
crate.
As the currently logged in user accept an invitation to become an owner of the named crate .
fn accept_ownership_invitation(&self, krate_name: &str, krate_id: i32) {
        let body = json!({
            "crate_owner_invite": {
                "invited_by_username": "",
                "crate_name": krate_name,
                "crate_id": krate_id,
                "created_at": "",
                "accepted": true
            }
        });
        #[derive(Deserialize)]
        struct CrateOwnerInvitation {
            crate_owner_invitation: InvitationResponse,
        }
        let url = format!("/api/v1/me/crate_owner_invitations/{}", krate_id);
        let crate_owner_invite: CrateOwnerInvitation =
            self.put(&url, body.to_string().as_bytes()).good();
        assert!(crate_owner_invite.crate_owner_invitation.accepted);
        assert_eq!(crate_owner_invite.crate_owner_invitation.crate_id, krate_id);
    }
fn accept_ownership_invitation ( & self , krate_name : & str , krate_id : i32 ) { let body = json ! ( { " " { " " " " " " krate_name " " krate_id " " " " " " true } } ) ; # [ derive ( Deserialize ) ] struct CrateOwnerInvitation { crate_owner_invitation : InvitationResponse , } let url = format ! ( " " krate_id ) ; let crate_owner_invite : CrateOwnerInvitation = self . put ( & url , body . to_string ( ) . as_bytes ( ) ) . good ( ) ; assert ! ( crate_owner_invite crate_owner_invitation accepted ) ; assert_eq ! ( crate_owner_invite crate_owner_invitation crate_id krate_id ) ; }
As the currently logged in user, accept an invitation to become an owner of the named
crate.
As the currently logged in user accept an invitation to become an owner of the named crate .
&self
krate_name
&str
krate_id
i32