Struct actix_tools::sentry::sentry_client::Scope [−][src]
pub struct Scope { /* fields omitted */ }
Holds contextual data for the current scope.
The scope is an object that can cloned efficiently and stores data that is locally relevant to an event. For instance the scope will hold recorded breadcrumbs and similar information.
The scope can be interacted with in two ways:
- the scope is routinely updated with information by functions such as
add_breadcrumb
which will modify the currently top-most scope. - the topmost scope can also be configured through the
configure_scope
method.
Note that the scope can only be modified but not inspected. Only the client can use the scope to extract information currently.
Methods
impl Scope
[src]
impl Scope
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
Clear the scope.
By default a scope will inherit all values from the higher scope. In some situations this might not be what a user wants. Calling this method will wipe all data contained within.
pub fn set_fingerprint(&mut self, fingerprint: Option<&[&str]>)
[src]
pub fn set_fingerprint(&mut self, fingerprint: Option<&[&str]>)
Sets the fingerprint.
pub fn set_transaction(&mut self, transaction: Option<&str>)
[src]
pub fn set_transaction(&mut self, transaction: Option<&str>)
Sets the transaction.
pub fn set_user(&mut self, user: Option<User>)
[src]
pub fn set_user(&mut self, user: Option<User>)
Sets the user for the current scope.
pub fn set_tag<V>(&mut self, key: &str, value: V) where
V: ToString,
[src]
pub fn set_tag<V>(&mut self, key: &str, value: V) where
V: ToString,
Sets a tag to a specific value.
pub fn remove_tag(&mut self, key: &str)
[src]
pub fn remove_tag(&mut self, key: &str)
Removes a tag.
pub fn set_context<C>(&mut self, key: &str, value: C) where
C: Into<Context>,
[src]
pub fn set_context<C>(&mut self, key: &str, value: C) where
C: Into<Context>,
Sets a context for a key.
pub fn remove_context(&mut self, key: &str)
[src]
pub fn remove_context(&mut self, key: &str)
Removes a context for a key.
pub fn set_extra(&mut self, key: &str, value: Value)
[src]
pub fn set_extra(&mut self, key: &str, value: Value)
Sets a extra to a specific value.
pub fn remove_extra(&mut self, key: &str)
[src]
pub fn remove_extra(&mut self, key: &str)
Removes a extra.
pub fn apply_to_event(&self, event: &mut Event)
[src]
pub fn apply_to_event(&self, event: &mut Event)
Applies the contained scoped data to fill an event.
Trait Implementations
impl Clone for Scope
[src]
impl Clone for Scope
fn clone(&self) -> Scope
[src]
fn clone(&self) -> Scope
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for Scope
[src]
impl Default for Scope
impl Debug for Scope
[src]
impl Debug for Scope