We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2bdeca commit fd92a32Copy full SHA for fd92a32
sentry-core/src/scope/real.rs
@@ -197,6 +197,11 @@ impl Scope {
197
self.user = user.map(Arc::new);
198
}
199
200
+ /// Retrieves the user of the current scope.
201
+ pub fn user(&self) -> Option<&User> {
202
+ self.user.as_deref()
203
+ }
204
+
205
/// Sets a tag to a specific value.
206
pub fn set_tag<V: ToString>(&mut self, key: &str, value: V) {
207
Arc::make_mut(&mut self.tags).insert(key.to_string(), value.to_string());
0 commit comments