fn generate_permission_grant(grantee: Grantee) -> Result<String, GranteeParseError> {
    if let Some(uri) = grantee.uri {
        return Ok(format!("uri=\"{}\"", uri));
    }
    if let Some(id) = grantee.id {
        return Ok(format!("id=\"{}\"", id));
    }
    if let Some(email) = grantee.email_address {
        return Ok(format!("emailAddress=\"{}\"", email));
    }
    Err(GranteeParseError::NoValidID { grantee })
}
/// Convert a Grantee object to a grant String to use in the CopyObjectRequest
Convert a Grantee object to a grant String to use in the CopyObjectRequest
Convert a Grantee object to a grant String to use in the CopyObjectRequest
fn generate_permission_grant(grantee: Grantee) -> Result<String, GranteeParseError> {
    if let Some(uri) = grantee.uri {
        return Ok(format!("uri=\"{}\"", uri));
    }
    if let Some(id) = grantee.id {
        return Ok(format!("id=\"{}\"", id));
    }
    if let Some(email) = grantee.email_address {
        return Ok(format!("emailAddress=\"{}\"", email));
    }
    Err(GranteeParseError::NoValidID { grantee })
}
fn generate_permission_grant ( grantee : Grantee ) -> Result < String , GranteeParseError > { if let Some ( uri ) = grantee . uri { return Ok ( format ! ( " \" \" " uri ) ) ; } if let Some ( id ) = grantee . id { return Ok ( format ! ( " \" \" " id ) ) ; } if let Some ( email ) = grantee . email_address { return Ok ( format ! ( " \" \" " email ) ) ; } Err ( GranteeParseError :: NoValidID { grantee } ) }
Convert a Grantee object to a grant String to use in the CopyObjectRequest
Convert a Grantee object to a grant String to use in the CopyObjectRequest
grantee
Grantee