Created
June 12, 2018 11:17
-
-
Save mitsuhiko/08420503db1b40aef2611ff447013b38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Clone)] | |
pub struct Scope { | |
pub(crate) fingerprint: Option<Arc<Vec<Cow<'static, str>>>>, | |
pub(crate) transaction: Option<Arc<String>>, | |
pub(crate) breadcrumbs: im::Vector<Breadcrumb>, | |
pub(crate) user: Option<Arc<User>>, | |
pub(crate) extra: im::HashMap<String, Value>, | |
pub(crate) tags: im::HashMap<String, String>, | |
pub(crate) contexts: im::HashMap<String, Option<Context>>, | |
pub(crate) scope_processors: im::Vector<Box<FnMut(&mut Event) + Sync + Send>>, | |
} | |
/// Registers a processing function with the scope. | |
pub fn add_scope_processor<F: FnMut(&mut Event) + Sync + Send>(&mut self, f: F) { | |
self.scope_processors = self.scope_processors.push_back(Box::new(f)); | |
} | |
error[E0277]: the trait bound `std::boxed::Box<F>: im::shared::Shared<std::boxed::Box<for<'r, 's> std::ops::FnMut(&'r mut sentry_types::protocol::v7::Event<'s>) + std::marker::Sync + std::marker::Send>>` is not satisfied | |
--> src/scope/real.rs:234:55 | |
| | |
234 | self.scope_processors = self.scope_processors.push_back(Box::new(f)); | |
| ^^^^^^^^^ the trait `im::shared::Shared<std::boxed::Box<for<'r, 's> std::ops::FnMut(&'r mut sentry_types::protocol::v7::Event<'s>) + std::marker::Sync + std::marker::Send>>` is not implemented for `std::boxed::Box<F>` | |
| | |
= help: consider adding a `where std::boxed::Box<F>: im::shared::Shared<std::boxed::Box<for<'r, 's> std::ops::FnMut(&'r mut sentry_types::protocol::v7::Event<'s>) + std::marker::Sync + std::marker::Send>>` bound |
you can probably remove some of the qualified trait/struct names there to make it less verbose
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's