Struct zero_copy_pads::PaddedValueBuilder[][src]

pub struct PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    Value: Width,
    PadBlock: Display,
    HandleExcess: ExcessHandler<Value, PadBlock>,
    Pad: Pad<Value, PadBlock>, 
{ /* fields omitted */ }

Builder for PaddedValue.

Implementations

impl<Value: Clone, PadBlock: Clone, HandleExcess: Clone, Pad: Clone> PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    Value: Width,
    PadBlock: Display,
    HandleExcess: ExcessHandler<Value, PadBlock>,
    Pad: Pad<Value, PadBlock>, 
[src]

pub fn value(&mut self, value: Value) -> &mut Self[src]

Value to be padded.

pub fn pad_block(&mut self, value: PadBlock) -> &mut Self[src]

Block of the pad (expected to have width of 1).

pub fn total_width(&mut self, value: usize) -> &mut Self[src]

Total width to fulfill.

pub fn pad(&mut self, value: Pad) -> &mut Self[src]

How to pad.

pub fn handle_excess(&mut self, value: HandleExcess) -> &mut Self[src]

How to write when the actual width of value exceeds total_width.

pub fn build(
    &self
) -> Result<PaddedValue<Value, PadBlock, HandleExcess, Pad>, PaddedValueBuilderError>
[src]

Builds a new PaddedValue.

Errors

If a required field has not been initialized.

Trait Implementations

impl<Value: Clone, PadBlock: Clone, HandleExcess: Clone, Pad: Clone> Clone for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    Value: Width,
    PadBlock: Display,
    HandleExcess: ExcessHandler<Value, PadBlock>,
    Pad: Pad<Value, PadBlock>, 
[src]

impl<Value: Clone, PadBlock: Clone, HandleExcess: Clone, Pad: Clone> Default for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    Value: Width,
    PadBlock: Display,
    HandleExcess: ExcessHandler<Value, PadBlock>,
    Pad: Pad<Value, PadBlock>, 
[src]

Auto Trait Implementations

impl<Value, PadBlock, HandleExcess, Pad> RefUnwindSafe for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    HandleExcess: RefUnwindSafe,
    Pad: RefUnwindSafe,
    PadBlock: RefUnwindSafe,
    Value: RefUnwindSafe

impl<Value, PadBlock, HandleExcess, Pad> Send for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    HandleExcess: Send,
    Pad: Send,
    PadBlock: Send,
    Value: Send

impl<Value, PadBlock, HandleExcess, Pad> Sync for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    HandleExcess: Sync,
    Pad: Sync,
    PadBlock: Sync,
    Value: Sync

impl<Value, PadBlock, HandleExcess, Pad> Unpin for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    HandleExcess: Unpin,
    Pad: Unpin,
    PadBlock: Unpin,
    Value: Unpin

impl<Value, PadBlock, HandleExcess, Pad> UnwindSafe for PaddedValueBuilder<Value, PadBlock, HandleExcess, Pad> where
    HandleExcess: UnwindSafe,
    Pad: UnwindSafe,
    PadBlock: UnwindSafe,
    Value: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.