[][src]Trait imgui::internal::RawCast

pub unsafe trait RawCast<T>: Sized {
    unsafe fn from_raw(raw: &T) -> &Self { ... }
unsafe fn from_raw_mut(raw: &mut T) -> &mut Self { ... }
unsafe fn raw(&self) -> &T { ... }
unsafe fn raw_mut(&mut self) -> &mut T { ... } }

Casting from/to a raw type that has the same layout and alignment as the target type

Provided methods

unsafe fn from_raw(raw: &T) -> &Self

Casts an immutable reference from the raw type

Safety

It is up to the caller to guarantee the cast is valid.

unsafe fn from_raw_mut(raw: &mut T) -> &mut Self

Casts a mutable reference from the raw type

Safety

It is up to the caller to guarantee the cast is valid.

unsafe fn raw(&self) -> &T

Casts an immutable reference to the raw type

Safety

It is up to the caller to guarantee the cast is valid.

unsafe fn raw_mut(&mut self) -> &mut T

Casts a mutable reference to the raw type

Safety

It is up to the caller to guarantee the cast is valid.

Loading content...

Implementors

impl RawCast<ImDrawData> for DrawData[src]

impl RawCast<ImFont> for Font[src]

impl RawCast<ImFontAtlas> for FontAtlas[src]

impl RawCast<ImFontGlyph> for FontGlyph[src]

impl RawCast<ImGuiIO> for Io[src]

impl RawCast<ImGuiStyle> for Style[src]

Loading content...