module response pub struct Response { pub: message string data T } // new_response constructs a new Response object with the given message // & an empty data field. pub fn new_response(message string) Response { return Response{ message: message data: '' } } // new_data_response constructs a new Response object with the given data // & an empty message field. pub fn new_data_response(data T) Response { return Response{ message: '' data: data } } // new_full_response constructs a new Response object with the given // message & data. pub fn new_full_response(message string, data T) Response { return Response{ message: message data: data } }