pub fn from_vec(parameters: Vec<String>) -> Feed {
        let mut consumed = parameters;
        let url: String = consumed
            .pop()
            .expect("You must at least define an url to add.");
        let mut email: Option<String> = None;
        let mut folder: Option<String> = None;
        // If there is a second parameter, it can be either email or folder
        if !consumed.is_empty() {
            let second = consumed.pop().unwrap();
            // If second parameters contains an @, I suppose it is an email address
            if second.contains('@') {
                debug!(
                    "Second add parameter {} is considered an email address",
                    second
                );
                email = Some(second)
            } else {
                warn!("Second add parameter {} is NOT considered an email address, but a folder. NO MORE ARGUMENTS WILL BE PROCESSED", second);
                folder = Some(second)
            }
        }
        // If there is a third parameter, it is the folder.
        // But if folder was already defined, there is an error !
        if !consumed.is_empty() && folder == None {
            folder = Some(consumed.pop().unwrap());
        }
        Feed {
            url,
            config: Config {
                email,
                folder,
                from: None,
                inline_image_as_data: false,
            },
            last_updated: Feed::at_epoch(),
            last_message: None
        }
    }
// Convert the parameters vec into a valid feed (if possible)

Convert the parameters vec into a valid feed (if possible)
Convert the parameters vec into a valid feed ( if possible )
pub fn from_vec(parameters: Vec<String>) -> Feed {
        let mut consumed = parameters;
        let url: String = consumed
            .pop()
            .expect("You must at least define an url to add.");
        let mut email: Option<String> = None;
        let mut folder: Option<String> = None;
        // If there is a second parameter, it can be either email or folder
        if !consumed.is_empty() {
            let second = consumed.pop().unwrap();
            // If second parameters contains an @, I suppose it is an email address
            if second.contains('@') {
                debug!(
                    "Second add parameter {} is considered an email address",
                    second
                );
                email = Some(second)
            } else {
                warn!("Second add parameter {} is NOT considered an email address, but a folder. NO MORE ARGUMENTS WILL BE PROCESSED", second);
                folder = Some(second)
            }
        }
        // If there is a third parameter, it is the folder.
        // But if folder was already defined, there is an error !
        if !consumed.is_empty() && folder == None {
            folder = Some(consumed.pop().unwrap());
        }
        Feed {
            url,
            config: Config {
                email,
                folder,
                from: None,
                inline_image_as_data: false,
            },
            last_updated: Feed::at_epoch(),
            last_message: None
        }
    }
pub fn from_vec ( parameters : Vec < String > ) -> Feed { let mut consumed = parameters ; let url : String = consumed . pop ( ) . expect ( " " ) ; let mut email : Option < String > = None ; let mut folder : Option < String > = None ; // If there is a second parameter, it can be either email or folder
 if ! consumed . is_empty ( ) { let second = consumed . pop ( ) . unwrap ( ) ; // If second parameters contains an @, I suppose it is an email address
 if second . contains ( '@' ) { debug ! ( " " second ) ; email = Some ( second ) } else { warn ! ( " " second ) ; folder = Some ( second ) } } // If there is a third parameter, it is the folder.
 // But if folder was already defined, there is an error !
 if ! consumed . is_empty ( ) && folder == None { folder = Some ( consumed . pop ( ) . unwrap ( ) ) ; } Feed { url , config : Config { email , folder , from : None , inline_image_as_data : false , } , last_updated : Feed :: at_epoch ( ) , last_message : None } }
Convert the parameters vec into a valid feed (if possible)
Convert the parameters vec into a valid feed ( if possible )
parameters
Vec<String>
parameters
Vec<String>