Inhibits transcription of the trehalose/maltose transport gene cluster (malE operon). Acts by binding to two different operator sequences in the promoter, preventing polymerase recruitment and transcription. Repressor activity is regulated by binding of sugars to TrmB. Binding of maltose and trehalose results in derepression of the malE operon. Maltose is much more effective (50-100 uM) than trehalose (2.5 mM). Homodimer. Contains an N-terminal DNA-binding domain and a C-terminal sugar-binding domain. Belongs to the transcriptional regulator TrmB family.