[][src]Struct unsafety::UnsafeReason

pub struct UnsafeReason {}

Represents an annotation on an unsafe code block or item. Because these annotations are intended to have no effect on code generation, this type is empty.

Methods

impl UnsafeReason[src]

pub const fn new(_reason_id: &'static str) -> Self[src]

Starts a new annotation block, given a reason identifier.

pub const fn bug(self, _bug_id: &'static str) -> Self[src]

An annotation which identifies a bug. This might be a simple identifier, such as 42, although it will typically be a URL in a bug tracking database.

pub const fn message(self, _message: &'static str) -> Self[src]

An annotation which is an arbitrary message to the reader. This is different from simple code comments because this annotation will be noticed by auditing tools.

pub const fn owner(self, _owner: &'static str) -> Self[src]

An annotation which is the name, user id, or email address of an owner or otherwise accountable person.

An annotation which is a link (URL) to a relevant document, such as a design document.

pub const fn tag(self, _tag: &'static str, _value: &'static str) -> Self[src]

An annotation which is an arbitrary key-value pair.

Auto Trait Implementations

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, 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.