pub fn allocate(client: &ClientXMLRPC, name: &str, passwd: &str, auth_drv: &str) -> Result<i32, String> {
        let req = client.new_request("one.user.allocate").arg(name)
                                                         .arg(passwd)
                                                         .arg(auth_drv);
        let response = client.call(req);

        match response {
            Ok(resp) => {
                if resp.rc() {
                    if let Some(value) = resp.get_int(1) {
                        return Ok(value);
                    }
                } else if let Some(value) = resp.get_str(1) {
                        return Err(String::from(value));
                }
            },

            Err(e) => return Err(e)
        };

        Err(String::from("The position required does not math the type."))
    }
// TODOs:
// - enum form auth_drv options
// - more helpers without some options (i.e groups, auth_drv)
// - add last parameter: array of groups. Currently the client only support Array(Vec<Value>)
enum form auth_drv options
more helpers without some options
add last parameter: array of groups. Currently the client only support Array(Vec)
enum form auth_drv options more helpers without some options add last parameter : array of groups . Currently the client only support Array ( Vec )
pub fn allocate(client: &ClientXMLRPC, name: &str, passwd: &str, auth_drv: &str) -> Result<i32, String> {
        let req = client.new_request("one.user.allocate").arg(name)
                                                         .arg(passwd)
                                                         .arg(auth_drv);
        let response = client.call(req);
        match response {
            Ok(resp) => {
                if resp.rc() {
                    if let Some(value) = resp.get_int(1) {
                        return Ok(value);
                    }
                } else if let Some(value) = resp.get_str(1) {
                        return Err(String::from(value));
                }
            },
            Err(e) => return Err(e)
        };
        Err(String::from("The position required does not math the type."))
    }
pub fn allocate ( client : & ClientXMLRPC , name : & str , passwd : & str , auth_drv : & str ) -> Result < i32 , String > { let req = client . new_request ( " " ) . arg ( name ) . arg ( passwd ) . arg ( auth_drv ) ; let response = client . call ( req ) ; match response { Ok ( resp ) => { if resp . rc ( ) { if let Some ( value ) = resp . get_int ( 1 ) { return Ok ( value ) ; } } else if let Some ( value ) = resp . get_str ( 1 ) { return Err ( String :: from ( value ) ) ; } } , Err ( e ) => return Err ( e ) } ; Err ( String :: from ( " " ) ) }
TODOs:
 enum form auth_drv options
 more helpers without some options (i.e groups, auth_drv)
 add last parameter: array of groups.
TODOs : enum form auth_drv options more helpers without some options ( i . e groups auth_drv ) add last parameter : array of groups .
client
&ClientXMLRPC
name
&str
passwd
&str
auth_drv
&str
client
&ClientXMLRPC
name
&str
passwd
&str
auth_drv
&str