Struct value_bag::fill::Slot[][src]

pub struct Slot<'s, 'f> { /* fields omitted */ }
Expand description

A value slot to fill using the Fill trait.

Implementations

impl<'s, 'f> Slot<'s, 'f>[src]

pub fn fill_any<T>(&mut self, value: T) -> Result<(), Error> where
    T: Into<ValueBag<'f>>, 
[src]

Fill the slot with a value.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

impl<'s, 'f> Slot<'s, 'f>[src]

pub fn fill_error<T>(&mut self, value: T) -> Result<(), Error> where
    T: Error + 'static, 
[src]

Fill the slot with an error.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

pub fn fill_dyn_error(
    &mut self,
    value: &(dyn Error + 'static)
) -> Result<(), Error>
[src]

Fill the slot with an error.

impl<'s, 'f> Slot<'s, 'f>[src]

pub fn fill_debug<T>(&mut self, value: T) -> Result<(), Error> where
    T: Debug
[src]

Fill the slot with a debuggable value.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

pub fn fill_display<T>(&mut self, value: T) -> Result<(), Error> where
    T: Display
[src]

Fill the slot with a displayable value.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

impl<'s, 'f> Slot<'s, 'f>[src]

pub fn fill_serde1<T>(&mut self, value: T) -> Result<(), Error> where
    T: Serialize
[src]

Fill the slot with a structured value.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

impl<'s, 'f> Slot<'s, 'f>[src]

pub fn fill_sval1<T>(&mut self, value: T) -> Result<(), Error> where
    T: Value
[src]

Fill the slot with a structured value.

The given value doesn’t need to satisfy any particular lifetime constraints.

Panics

Calling more than a single fill method on this slot will panic.

pub fn fill_dyn_sval1(&mut self, value: &dyn Value) -> Result<(), Error>[src]

Fill the slot with a structured value.

Trait Implementations

impl<'s, 'f> Debug for Slot<'s, 'f>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'s, 'f> !RefUnwindSafe for Slot<'s, 'f>

impl<'s, 'f> !Send for Slot<'s, 'f>

impl<'s, 'f> !Sync for Slot<'s, 'f>

impl<'s, 'f> Unpin for Slot<'s, 'f> where
    'f: 's, 

impl<'s, 'f> !UnwindSafe for Slot<'s, 'f>

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