DebcargoSource

Struct DebcargoSource 

Source
pub struct DebcargoSource<'a> { /* private fields */ }
Expand description

The source package in a debcargo.toml file.

Implementations§

Source§

impl DebcargoSource<'_>

Source

pub fn toml_section_mut(&mut self) -> &mut Table

Return the source section of the debcargo.toml file.

Source

pub fn set_standards_version(&mut self, version: &str) -> &mut Self

Set the standards version.

Source

pub fn standards_version(&self) -> &str

Return the standards version.

Source

pub fn set_homepage(&mut self, homepage: &str) -> &mut Self

Set the homepage.

Source

pub fn homepage(&self) -> Option<&str>

Return the homepage.

Source

pub fn set_vcs_git(&mut self, git: &str) -> &mut Self

Set the VCS Git URL.

Source

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

Return the VCS Git URL.

Source

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

Get the VCS browser URL.

Source

pub fn set_vcs_browser(&mut self, browser: &str) -> &mut Self

Set the VCS browser URL.

Source

pub fn section(&self) -> &str

Get the section.

Source

pub fn set_section(&mut self, section: &str) -> &mut Self

Set the section.

Source

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

Get the name of the package.

Source

pub fn priority(&self) -> Priority

Get the priority.

Source

pub fn set_priority(&mut self, priority: Priority) -> &mut Self

Set the priority.

Source

pub fn rules_requires_root(&self) -> bool

Get whether the package build requires root.

Source

pub fn set_rules_requires_root(&mut self, requires_root: bool) -> &mut Self

Set whether the package build requires root.

Source

pub fn maintainer(&self) -> &str

Get the maintainer.

Source

pub fn set_maintainer(&mut self, maintainer: &str) -> &mut Self

Set the maintainer.

Source

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

Get the uploaders.

Source

pub fn set_uploaders(&mut self, uploaders: Vec<String>) -> &mut Self

Set the uploaders.

Source

pub fn extra_lines(&self) -> Vec<String>

Get the extra_lines field as a vector of strings.

Source

pub fn set_extra_lines(&mut self, lines: Vec<String>) -> &mut Self

Set the extra_lines field.

Source

pub fn add_extra_line(&mut self, line: String) -> &mut Self

Add a line to extra_lines if it doesn’t already exist.

Source

pub fn remove_extra_line(&mut self, line: &str) -> &mut Self

Remove a line from extra_lines.

Source

pub fn get_extra_field(&self, field_name: &str) -> Option<String>

Get a field value from extra_lines (for debian/control fields). Looks for lines in the format “Field: value” and returns the value.

Source

pub fn set_extra_field(&mut self, field_name: &str, value: &str) -> &mut Self

Set a field in extra_lines (for debian/control fields). Updates existing field or adds new one if not present.

Source

pub fn remove_extra_field(&mut self, field_name: &str) -> &mut Self

Remove a field from extra_lines.

Source

pub fn set_vcs_url(&mut self, vcs_type: &str, url: &str) -> &mut Self

Set a VCS URL using the appropriate method. Uses native fields for Git and Browser, extra_lines for others.

Source

pub fn get_vcs_url(&self, vcs_type: &str) -> Option<String>

Get a VCS URL using the appropriate method. Uses native fields for Git and Browser, extra_lines for others.

Trait Implementations§

Source§

impl<'a> AbstractSource<'a> for DebcargoSource<'a>

Source§

fn name(&self) -> Option<String>

Get the name of the source package.
Source§

fn ensure_build_dep(&mut self, dep: Entry)

Ensure that a build dependency is present.
Source§

fn set_maintainer(&mut self, maintainer: &str)

Set the maintainer of the source package.
Source§

fn set_uploaders(&mut self, uploaders: &[&str])

Set the uploaders of the source package.
Source§

fn set_vcs_url(&mut self, vcs_type: &str, url: &str)

Set the VCS URL for the source package.
Source§

fn get_vcs_url(&self, vcs_type: &str) -> Option<String>

Get the VCS URL for the source package.

Auto Trait Implementations§

§

impl<'a> Freeze for DebcargoSource<'a>

§

impl<'a> RefUnwindSafe for DebcargoSource<'a>

§

impl<'a> Send for DebcargoSource<'a>

§

impl<'a> Sync for DebcargoSource<'a>

§

impl<'a> Unpin for DebcargoSource<'a>

§

impl<'a> !UnwindSafe for DebcargoSource<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

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

§

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Ungil for T
where T: Send,