pub struct ServiceSpec {
pub name: String,
pub version: String,
pub filter: ActionFilter,
}Expand description
One Google API (e.g. Drive v3) to generate.
Only APIs you list in BuilderConfig::services are codegenned. To keep binaries small and
scopes minimal, give each API a ActionFilter::Whitelist (see ServiceSpec::whitelist).
Fields§
§name: String§version: String§filter: ActionFilterImplementations§
Source§impl ServiceSpec
impl ServiceSpec
Sourcepub fn whitelist(
name: impl Into<String>,
version: impl Into<String>,
patterns: Vec<String>,
) -> Result<Self, BuilderError>
pub fn whitelist( name: impl Into<String>, version: impl Into<String>, patterns: Vec<String>, ) -> Result<Self, BuilderError>
Emit only methods matching these patterns; see ActionFilter and the crate README.
Returns an error if patterns is empty — use list_available_actions to discover ids,
then add patterns such as files.* or users.messages.list.
Trait Implementations§
Source§impl Clone for ServiceSpec
impl Clone for ServiceSpec
Source§fn clone(&self) -> ServiceSpec
fn clone(&self) -> ServiceSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceSpec
impl Debug for ServiceSpec
Source§impl PartialEq for ServiceSpec
impl PartialEq for ServiceSpec
impl Eq for ServiceSpec
impl StructuralPartialEq for ServiceSpec
Auto Trait Implementations§
impl Freeze for ServiceSpec
impl RefUnwindSafe for ServiceSpec
impl Send for ServiceSpec
impl Sync for ServiceSpec
impl Unpin for ServiceSpec
impl UnsafeUnpin for ServiceSpec
impl UnwindSafe for ServiceSpec
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