Dust mask &weed

I do not intend to smoke weed but would a gas or partial mask prevent inhalation and/or second hand smoking??