Skip to main content

Header

Struct Header 

Source
pub struct Header(/* private fields */);
Expand description

A header paragraph

Implementations§

Source§

impl Header

Source

pub fn format_string(&self) -> Option<String>

Returns the format string for this file.

Source

pub fn as_deb822(&self) -> &Paragraph

Return the underlying Deb822 paragraph

Source

pub fn as_mut_deb822(&mut self) -> &mut Paragraph

👎Deprecated: Use as_deb822 instead

Return the underlying Deb822 paragraph, mutably

Source

pub fn upstream_name(&self) -> Option<String>

Upstream name

Source

pub fn set_upstream_name(&mut self, name: &str)

Set the upstream name

Source

pub fn upstream_contact(&self) -> Option<String>

Upstream contact

Source

pub fn set_upstream_contact(&mut self, contact: &str)

Set the upstream contact

Source

pub fn source(&self) -> Option<String>

Source

Source

pub fn set_source(&mut self, source: &str)

Set the source

Source

pub fn files_excluded(&self) -> Option<Vec<String>>

List of files excluded from the copyright information, as well as the source package

Source

pub fn set_files_excluded(&mut self, files: &[&str])

Set excluded files

Source

pub fn fix(&mut self)

Fix the the header paragraph

Currently this just renames Format-Specification to Format and replaces older format strings with the current format string.

Auto Trait Implementations§

§

impl Freeze for Header

§

impl !RefUnwindSafe for Header

§

impl !Send for Header

§

impl !Sync for Header

§

impl Unpin for Header

§

impl UnsafeUnpin for Header

§

impl !UnwindSafe for Header

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.