The officers mentioned in this article shall at stated times receive for their services a such compensation as is established by law, which shall not be diminished during their terms of office, unless by general law applicable to all salaried officers of the state.