Struct sentry::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]
pub fn clear(&mut self)
[src]
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]
Sets the fingerprint.
pub fn set_transaction(&mut self, transaction: Option<&str>)
[src]
Sets the transaction.
pub fn set_user(&mut self, user: Option<User>)
[src]
Sets the user for the current scope.
pub fn set_tag<V: ToString>(&mut self, key: &str, value: V)
[src]
Sets a tag to a specific value.
pub fn remove_tag(&mut self, key: &str)
[src]
Removes a tag.
pub fn set_context<C: Into<Context>>(&mut self, key: &str, value: C)
[src]
Sets a context for a key.
pub fn remove_context(&mut self, key: &str)
[src]
Removes a context for a key.
pub fn set_extra(&mut self, key: &str, value: Value)
[src]
Sets a extra to a specific value.
pub fn remove_extra(&mut self, key: &str)
[src]
Removes a extra.
Trait Implementations
impl Debug for Scope
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more