You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made this small Trait extension for adding multiple scopes at once to a specific *Call.
It really helps when you have a static defining your scopes per request.
Can this be added to the *Call structs for convenience in some way?
use gmail1::api::{Scope,UserMessageGetCall,UserMessageListCall};/// Extension trait for all Gmail calls.pubtraitCallExt{fnadd_scopes(self,scopes:&[Scope]) -> Self;}impl<'a>CallExtforUserMessageGetCall<'a>{fnadd_scopes(mutself,scopes:&[Scope]) -> UserMessageGetCall<'a>{for scope in scopes {self = self.add_scope(scope);}self}}impl<'a>CallExtforUserMessageListCall<'a>{fnadd_scopes(mutself,scopes:&[Scope]) -> UserMessageListCall<'a>{for scope in scopes {self = self.add_scope(scope);}self}}
The text was updated successfully, but these errors were encountered:
This does indeed look useful to have, and a PR would be very welcome. If you consider submitting one, please don't regenerate the APIs as it makes the review difficult. Thanks.
elpiel
changed the title
The abbility to add mutliple scopes for a Call
The ability to add mutliple scopes for a Call
Jun 24, 2022
I've made this small Trait extension for adding multiple scopes at once to a specific *Call.
It really helps when you have a static defining your scopes per request.
Can this be added to the *Call structs for convenience in some way?
The text was updated successfully, but these errors were encountered: