DETROIT — Eager to move on from the Democratic primary race, Hillary Clinton has turned down an invitation to debate Senator Bernie Sanders ahead of California’s primary, her campaign said on Monday.

The announcement came hours after Mrs. Clinton unleashed a biting critique of Donald J. Trump while addressing a union convention, mocking his business record and offering a glimpse at how she might confront him in the general election.

Mr. Sanders’s campaign last week tentatively accepted an invitation by Fox News to participate in a debate before California’s June 7 primary, and expressed hope that Mrs. Clinton would agree to face off against the senator.

In a statement issued Monday evening, a spokeswoman for Mrs. Clinton’s campaign, Jennifer Palmieri, said Mrs. Clinton’s team would contest California while “turning our attention to the threat a Donald Trump presidency poses.”