Struct tugger_debian::ControlParagraph [−][src]
A paragraph in a control file.
A paragraph is an ordered series of control fields.
Implementations
impl<'a> ControlParagraph<'a>
[src]
pub fn add_field(&mut self, field: ControlField<'a>)
[src]
Add a ControlField
to this instance.
pub fn add_field_from_string(
&mut self,
name: Cow<'a, str>,
value: Cow<'a, str>
) -> Result<(), ControlError>
[src]
&mut self,
name: Cow<'a, str>,
value: Cow<'a, str>
) -> Result<(), ControlError>
Add a field defined via strings.
pub fn has_field(&self, name: &str) -> bool
[src]
Whether a named field is present in this paragraph.
pub fn get_field(&self, name: &str) -> Option<&ControlField<'_>>
[src]
Obtain the first field with a given name in this paragraph.
pub fn get_field_mut(&mut self, name: &str) -> Option<&'a mut ControlField<'_>>
[src]
Obtain a mutable reference to the first field with a given name.
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
[src]
Serialize the paragraph to a writer.
Trait Implementations
impl<'a> Clone for ControlParagraph<'a>
[src]
fn clone(&self) -> ControlParagraph<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for ControlParagraph<'a>
[src]
impl<'a> Default for ControlParagraph<'a>
[src]
fn default() -> ControlParagraph<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ControlParagraph<'a>
impl<'a> Send for ControlParagraph<'a>
impl<'a> Sync for ControlParagraph<'a>
impl<'a> Unpin for ControlParagraph<'a>
impl<'a> UnwindSafe for ControlParagraph<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,