Struct safer_ffi::headers::HashSetDefiner[][src]

pub struct HashSetDefiner<'out> {
    pub defines_set: HashSet<String>,
    pub out: &'out mut dyn Write,
}
This is supported on crate feature headers only.
Expand description

Simplest implementation of a Definer: a HashSet<String>, &'_ mut dyn Write pair.

Fields

defines_set: HashSet<String>out: &'out mut dyn Write

Trait Implementations

impl Definer for HashSetDefiner<'_>[src]

fn insert(&mut self, name: &str) -> bool[src]

Must return true iff an actual insert happened.

fn out(&mut self) -> &mut dyn Write[src]

Yields a handle to the underlying Writer

fn define_once(
    &mut self,
    name: &str,
    write_typedef: &mut dyn FnMut(&mut dyn Definer) -> Result<()>
) -> Result<()>
[src]

Convenience method to perform an .insert() so that if it succeeds (thus guaranteeing the call happens for the first time), it calls write_typedef on itself. Read more

Auto Trait Implementations

impl<'out> !RefUnwindSafe for HashSetDefiner<'out>

impl<'out> !Send for HashSetDefiner<'out>

impl<'out> !Sync for HashSetDefiner<'out>

impl<'out> Unpin for HashSetDefiner<'out>

impl<'out> !UnwindSafe for HashSetDefiner<'out>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ManuallyDropMut for T[src]

type Ret = ManuallyDrop<T>

pub fn manually_drop_mut(&'__ mut self) -> &'__ mut ManuallyDrop<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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.