Struct tugger_debian::ControlField[][src]

pub struct ControlField<'a> { /* fields omitted */ }

A field in a control file.

Implementations

impl<'a> ControlField<'a>[src]

pub fn new(name: Cow<'a, str>, value: ControlFieldValue<'a>) -> Self[src]

Construct an instance from a field name and typed value.

pub fn from_string_value(
    key: Cow<'a, str>,
    value: Cow<'a, str>
) -> Result<Self, ControlError>
[src]

Construct a field from a named key and string value.

The type of the field value will be derived from the key name.

Unknown keys will be rejected.

pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>[src]

Write the contents of this field to a writer.

Trait Implementations

impl<'a> Clone for ControlField<'a>[src]

impl<'a> Debug for ControlField<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ControlField<'a>

impl<'a> Send for ControlField<'a>

impl<'a> Sync for ControlField<'a>

impl<'a> Unpin for ControlField<'a>

impl<'a> UnwindSafe for ControlField<'a>

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.