pub fn upload(&self) -> Result<()> {
        if SENTRY_GUARD.read().unwrap().is_enabled() {
            let mut event = Event::new();
            event.level = Level::Info;
            event.message = Some(format!("Summited Schema Patch for: {}.", GAME_SELECTED.read().unwrap().get_display_name()));

            let config = PrettyConfig::default();
            let mut data = vec![];
            to_writer_pretty(&mut data, &self, config)?;

            let mut envelope = Envelope::from(event);
            let attatchment = Attachment {
                buffer: data,
                filename: "patch.ron".to_owned(),
                ty: None
            };

            envelope.add_item(EnvelopeItem::Attachment(attatchment));
            SENTRY_GUARD.read().unwrap().send_envelope(envelope);
        }

        // TODO: Make this fail in case of sentry being not working?
        Ok(())
    }
/// This function uploads a patch to sentry's service.
This function uploads a patch to sentry's service.
This function uploads a patch to sentry ' s service .
pub fn upload(&self) -> Result<()> {
        if SENTRY_GUARD.read().unwrap().is_enabled() {
            let mut event = Event::new();
            event.level = Level::Info;
            event.message = Some(format!("Summited Schema Patch for: {}.", GAME_SELECTED.read().unwrap().get_display_name()));
            let config = PrettyConfig::default();
            let mut data = vec![];
            to_writer_pretty(&mut data, &self, config)?;
            let mut envelope = Envelope::from(event);
            let attatchment = Attachment {
                buffer: data,
                filename: "patch.ron".to_owned(),
                ty: None
            };
            envelope.add_item(EnvelopeItem::Attachment(attatchment));
            SENTRY_GUARD.read().unwrap().send_envelope(envelope);
        }
        // TODO: Make this fail in case of sentry being not working?
        Ok(())
    }
pub fn upload ( & self ) -> Result < ( ) > { if SENTRY_GUARD . read ( ) . unwrap ( ) . is_enabled ( ) { let mut event = Event :: new ( ) ; event . level = Level :: Info ; event . message = Some ( format ! ( " " GAME_SELECTED read ( ) unwrap ( ) get_display_name ( ) ) ) ; let config = PrettyConfig :: default ( ) ; let mut data = vec ! [ ] ; to_writer_pretty ( & mut data , & self , config ) ? ; let mut envelope = Envelope :: from ( event ) ; let attatchment = Attachment { buffer : data , filename : " " . to_owned ( ) , ty : None } ; envelope . add_item ( EnvelopeItem :: Attachment ( attatchment ) ) ; SENTRY_GUARD . read ( ) . unwrap ( ) . send_envelope ( envelope ) ; } // TODO: Make this fail in case of sentry being not working? Ok ( ( ) ) }
This function uploads a patch to sentry's service.
This function uploads a patch to sentry ' s service .
&self
&self