[][src]Module sentry_core::types

This crate provides common types for working with the Sentry protocol or the Sentry server. It's used by the Sentry Relay infrastructure as well as the rust Sentry client.

Most of the types in this crate are serializable in one form or another. The types in the protocol module are generally really only serializable to JSON as other formats are not supported by Sentry at this date.

Contents

The crate provides a bunch of common types for working with Sentry as such (DSN, ProjectIDs, authentication headers) as well as types for the Sentry event protocol.

Right now only v7 of the protocol is implemented but it's versioned so later versions might be added later.

API Concepts

Most types are directly serializable or deserializable and try to implement the Default type. This means that objects can be created conviently and missing attributes can be filled in:

use sentry_types::protocol::v7;

let event = v7::Event {
    message: Some("Hello World!".to_string()),
    culprit: Some("foo in bar".to_string()),
    level: v7::Level::Info,
    ..Default::default()
};

Modules

protocol

This module exposes the types for the Sentry protocol in different versions.

Structs

Auth

Represents an auth header.

BreakpadFormat

Wrapper around DebugId for Breakpad formatting.

ChronoParseError

An error from the parse function.

CodeId

Unique platform-dependent identifier of code files.

DateTime

ISO 8601 combined date and time with time zone.

DebugId

Unique identifier for debug information files and their debug information.

Dsn

Represents a Sentry dsn.

ParseCodeIdError

Indicates an error parsing a CodeId.

ParseDebugIdError

Indicates an error parsing a DebugId.

ProjectId

Represents a project ID.

Utc

The UTC time zone. This is the most efficient time zone when you don't need the local time. It is also used as an offset (which is also a dummy type).

Uuid

A Universally Unique Identifier (UUID).

Enums

ParseAuthError

Represents an auth header parsing error.

ParseDsnError

Represents a dsn url parsing error.

ParseProjectIdError

Raised if a project ID cannot be parsed from a string.

Scheme

Represents the scheme of an url http/https.

UuidVariant

The reserved variants of UUIDs.

UuidVersion

The version of the UUID, denoting the generating algorithm.

Traits

TimeZone

The time zone.