[−][src]Struct unsafety::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.
pub const fn link(self, _url: &'static str) -> Self
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,