libappstream::prelude

Trait AgreementExt

source
pub trait AgreementExt:
    IsA<Agreement>
    + Sealed
    + 'static {
    // Provided methods
    fn add_section(&self, agreement_section: &impl IsA<AgreementSection>) { ... }
    fn kind(&self) -> AgreementKind { ... }
    fn section_default(&self) -> Option<AgreementSection> { ... }
    fn sections(&self) -> Vec<AgreementSection> { ... }
    fn version_id(&self) -> Option<GString> { ... }
    fn set_kind(&self, kind: AgreementKind) { ... }
    fn set_version_id(&self, version_id: &str) { ... }
}
Expand description

Trait containing all Agreement methods.

§Implementors

Agreement

Provided Methods§

source

fn add_section(&self, agreement_section: &impl IsA<AgreementSection>)

source

fn kind(&self) -> AgreementKind

Gets the agreement kind.

§Returns

a string, e.g. AgreementKind::Eula

source

fn section_default(&self) -> Option<AgreementSection>

Gets the first section in the agreement.

§Returns

agreement section, or None

source

fn sections(&self) -> Vec<AgreementSection>

Gets all the sections in the agreement.

§Returns

array

source

fn version_id(&self) -> Option<GString>

Gets the agreement version_id.

§Returns

a string, e.g. “1.4a”, or NULL

source

fn set_kind(&self, kind: AgreementKind)

Sets the agreement kind.

§kind

the agreement kind, e.g. AgreementKind::Eula

source

fn set_version_id(&self, version_id: &str)

Sets the agreement version identifier.

§version_id

the agreement version ID, e.g. “1.4a”

Object Safety§

This trait is not object safe.

Implementors§