mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2025-12-26 17:02:24 +01:00
feat(layout): improved module layout
As there will be plenty of types, it will be better to split it up. Also learned something about self::<submodule> :). Insert and and update should be hand-implemented just to see how it's working. Then there should be some investment to auto-generate this with `gsl`. Once the latter works ... I could auto-generate all apis, or adjust the go generator to create rust instead. Depends on what will be faster ... .
This commit is contained in:
3
src/videos/mod.rs
Normal file
3
src/videos/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub use self::service::*;
|
||||
|
||||
mod service;
|
||||
@@ -2,9 +2,13 @@ use std::cell::RefCell;
|
||||
use std::borrow::BorrowMut;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use rustc_serialize;
|
||||
|
||||
use hyper;
|
||||
|
||||
pub struct VideosService<'a, C, NC>
|
||||
|
||||
/// The videos service - provides actual functionality through builders.
|
||||
pub struct Service<'a, C, NC>
|
||||
where NC: 'a,
|
||||
C: 'a {
|
||||
|
||||
@@ -13,12 +17,12 @@ pub struct VideosService<'a, C, NC>
|
||||
_m: PhantomData<NC>
|
||||
}
|
||||
|
||||
impl<'a, C, NC> VideosService<'a, C, NC>
|
||||
impl<'a, C, NC> Service<'a, C, NC>
|
||||
where NC: hyper::net::NetworkConnector,
|
||||
C: BorrowMut<hyper::Client<NC>> + 'a {
|
||||
|
||||
pub fn new(client: &'a RefCell<C>) -> VideosService<'a, C, NC> {
|
||||
VideosService {
|
||||
pub fn new(client: &'a RefCell<C>) -> Service<'a, C, NC> {
|
||||
Service {
|
||||
client: client,
|
||||
_m: PhantomData,
|
||||
}
|
||||
Reference in New Issue
Block a user