pub struct ServiceAccountImpersonationGrant { /* private fields */ }Expand description
A typed, explicitly bound IAM service-account impersonation grant.
The target service-account email, OAuth scopes, and delegate chain are
stable authorization configuration. Construct another grant (or use
ServiceAccountImpersonationGranter::with_grant) to change them. A
requested token lifetime is supplied separately to
reqsign_core::Granter::grant.
Delegate values are service-account emails or numeric service-account IDs.
Reqsign converts them into the canonical
projects/-/serviceAccounts/{identity} resource names required by Google.
Implementations§
Source§impl ServiceAccountImpersonationGrant
impl ServiceAccountImpersonationGrant
Sourcepub fn new(
target_service_account_email: impl Into<String>,
scopes: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn new( target_service_account_email: impl Into<String>, scopes: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create a grant for a target service-account email and OAuth scopes.
Sourcepub fn with_delegate(self, delegate: impl Into<String>) -> Self
pub fn with_delegate(self, delegate: impl Into<String>) -> Self
Append a delegate service-account email or numeric service-account ID.
Sourcepub fn with_delegates(
self,
delegates: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_delegates( self, delegates: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Append a chain of delegate service-account emails or numeric IDs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceAccountImpersonationGrant
impl RefUnwindSafe for ServiceAccountImpersonationGrant
impl Send for ServiceAccountImpersonationGrant
impl Sync for ServiceAccountImpersonationGrant
impl Unpin for ServiceAccountImpersonationGrant
impl UnsafeUnpin for ServiceAccountImpersonationGrant
impl UnwindSafe for ServiceAccountImpersonationGrant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more