Struct sentry_contrib_native::Uuid[][src]

pub struct Uuid(_);

A Sentry UUID.

Examples

let uuid = Event::new().capture();
println!("event sent has UUID: \"{}\"", uuid);
println!(
    "event sent has Sentry service compatible UUID: \"{}\"",
    uuid.to_plain()
);

Implementations

impl Uuid[src]

#[must_use]
pub fn from_bytes(bytes: [u8; 16]) -> Self
[src]

Creates a new empty UUID with the given bytes.

Examples

let uuid = Uuid::from_bytes([0; 16]);

#[must_use]
pub fn into_bytes(self) -> [u8; 16]
[src]

Returns the bytes of the Uuid.

Examples

assert_eq!([0; 16], Event::new().capture().into_bytes());

#[must_use]
pub fn as_bytes(&self) -> &[u8]
[src]

Yield the bytes of the Uuid.

Examples

assert_eq!([0; 16], Event::new().capture().as_bytes());

#[must_use]
pub fn to_plain(self) -> String
[src]

Yield the UUID without dashes.

Examples

assert_eq!(
    "00000000000000000000000000000000",
    Event::new().capture().to_plain()
);

Trait Implementations

impl AsRef<[u8]> for Uuid[src]

impl Clone for Uuid[src]

impl Copy for Uuid[src]

impl Debug for Uuid[src]

impl Default for Uuid[src]

impl Display for Uuid[src]

impl Eq for Uuid[src]

impl From<[u8; 16]> for Uuid[src]

impl Hash for Uuid[src]

impl Ord for Uuid[src]

impl PartialEq<Uuid> for Uuid[src]

impl PartialOrd<Uuid> for Uuid[src]

Auto Trait Implementations

impl RefUnwindSafe for Uuid

impl Send for Uuid

impl Sync for Uuid

impl Unpin for Uuid

impl UnwindSafe for Uuid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.