Function sentry_contrib_native::user_consent[][src]

#[must_use]
pub fn user_consent() -> Consent

Checks the current state of user consent.

Examples

let mut options = Options::new();
options.set_require_user_consent(true);
let _shutdown = options.init()?;

set_user_consent(Consent::Given);
assert_eq!(Consent::Given, user_consent());