pub fn add_attachment<S: Into<String>, P: Into<PathBuf>>(&mut self, name: S, path: P) {
        let name = name.into().into_cstring();
        let path = path.into().into_os_vec();

        #[cfg(windows)]
        unsafe {
            sys::options_add_attachmentw(self.as_mut(), name.as_ptr(), path.as_ptr())
        };
        #[cfg(not(windows))]
        unsafe {
            sys::options_add_attachment(self.as_mut(), name.as_ptr(), path.as_ptr())
        }
    }
/// Adds a new attachment to be sent along.
///
/// # Examples
/// ```
/// # use sentry_contrib_native::Options;
/// let mut options = Options::new();
/// options.add_attachment("test attachment", "server.log");
/// ```
Adds a new attachment to be sent along.
Adds a new attachment to be sent along .
pub fn add_attachment<S: Into<String>, P: Into<PathBuf>>(&mut self, name: S, path: P) {
        let name = name.into().into_cstring();
        let path = path.into().into_os_vec();
        #[cfg(windows)]
        unsafe {
            sys::options_add_attachmentw(self.as_mut(), name.as_ptr(), path.as_ptr())
        };
        #[cfg(not(windows))]
        unsafe {
            sys::options_add_attachment(self.as_mut(), name.as_ptr(), path.as_ptr())
        }
    }
pub fn add_attachment < S : Into < String > , P : Into < PathBuf > > ( & mut self , name : S , path : P ) { let name = name . into ( ) . into_cstring ( ) ; let path = path . into ( ) . into_os_vec ( ) ; # [ cfg ( windows ) ] unsafe { sys :: options_add_attachmentw ( self . as_mut ( ) , name . as_ptr ( ) , path . as_ptr ( ) ) } ; # [ cfg ( not ( windows ) ) ] unsafe { sys :: options_add_attachment ( self . as_mut ( ) , name . as_ptr ( ) , path . as_ptr ( ) ) } }
Adds a new attachment to be sent along.
Adds a new attachment to be sent along .
&mut self
name
S
path
P
&mut self
name
S
path
P
examples
None
use sentry_contrib_native::options;
let mut options = Options::new();
options.add_attachment("test attachment", "server.log");
```
let mut options = Options :: new () ; options . add_attachment ( " test attachment " " server . log " ) ; ` ` `