pub fn handle_fetch_response(&mut self, fetch_response: FetchResponse<T>) {
        use self::FetchResponse::*;
        *self = match fetch_response {
            Success(t) => Uploadable::NotUploaded(t),
            Error(_) =>{
                let existing_wrapped_value: &mut T = self.as_mut();
                Uploadable::Failed(mem::replace(existing_wrapped_value, T::default()),"Failed".into())
            }
            Started => {
                let existing_wrapped_value: &mut T = self.as_mut();
                Uploadable::Uploading(mem::replace(existing_wrapped_value, T::default()))
            }
        }
    }
/// Creates a loadable from a fetch response
Creates a loadable from a fetch response
Creates a loadable from a fetch response
pub fn handle_fetch_response(&mut self, fetch_response: FetchResponse<T>) {
        use self::FetchResponse::*;
        *self = match fetch_response {
            Success(t) => Uploadable::NotUploaded(t),
            Error(_) =>{
                let existing_wrapped_value: &mut T = self.as_mut();
                Uploadable::Failed(mem::replace(existing_wrapped_value, T::default()),"Failed".into())
            }
            Started => {
                let existing_wrapped_value: &mut T = self.as_mut();
                Uploadable::Uploading(mem::replace(existing_wrapped_value, T::default()))
            }
        }
    }
pub fn handle_fetch_response ( & mut self , fetch_response : FetchResponse < T > ) { use self :: FetchResponse :: * ; * self = match fetch_response { Success ( t ) => Uploadable :: NotUploaded ( t ) , Error ( _ ) => { let existing_wrapped_value : & mut T = self . as_mut ( ) ; Uploadable :: Failed ( mem :: replace ( existing_wrapped_value , T :: default ( ) ) , " " . into ( ) ) } Started => { let existing_wrapped_value : & mut T = self . as_mut ( ) ; Uploadable :: Uploading ( mem :: replace ( existing_wrapped_value , T :: default ( ) ) ) } } }
Creates a loadable from a fetch response
Creates a loadable from a fetch response
&mut self
fetch_response
FetchResponse<T>
&mut self
fetch_response
FetchResponse<T>