pub struct Dependency { /* private fields */ }Implementations§
Source§impl Dependency
impl Dependency
pub fn get_all() -> Result<Vec<Dependency>>
pub fn replace_all<'a>( dependencies: impl Iterator<Item = (Option<&'a DownloadedBottle>, &'a DownloadedBottle)>, ) -> Result<()>
Sourcepub fn dependent(&self) -> Result<Option<DownloadedBottle>>
pub fn dependent(&self) -> Result<Option<DownloadedBottle>>
Returns None if the bottle was manually added, i.e. if it is a root.
pub fn dependent_id(&self) -> Option<i32>
pub fn dependency(&self) -> Result<DownloadedBottle>
pub fn dependency_id(&self) -> i32
Trait Implementations§
Source§impl Debug for Dependency
impl Debug for Dependency
Source§impl<'insert> Insertable<table> for &'insert Dependency
impl<'insert> Insertable<table> for &'insert Dependency
Source§type Values = <(Option<Grouped<Eq<dependent_id, <&'insert i32 as AsExpression<<dependent_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<dependency_id, <&'insert i32 as AsExpression<<dependency_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<dependent_id, <&'insert i32 as AsExpression<<dependent_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<dependency_id, <&'insert i32 as AsExpression<<dependency_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<dependent_id, &'insert i32>>, Option<Eq<dependency_id, &'insert i32>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<dependent_id, &'insert i32>>, Option<Eq<dependency_id, &'insert i32>>) as Insertable<table>>::Values
Construct
Self::Values Read moreSource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self into a given table. Read moreSource§impl Insertable<table> for Dependency
impl Insertable<table> for Dependency
Source§type Values = <(Option<Grouped<Eq<dependent_id, <i32 as AsExpression<<dependent_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<dependency_id, <i32 as AsExpression<<dependency_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<dependent_id, <i32 as AsExpression<<dependent_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<dependency_id, <i32 as AsExpression<<dependency_id as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES clause to insert these records Read moreSource§fn values(
self,
) -> <(Option<Eq<dependent_id, i32>>, Option<Eq<dependency_id, i32>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<dependent_id, i32>>, Option<Eq<dependency_id, i32>>) as Insertable<table>>::Values
Construct
Self::Values Read moreSource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self into a given table. Read moreSource§impl<__DB: Backend, __ST0, __ST1> Queryable<(__ST0, __ST1), __DB> for Dependency
impl<__DB: Backend, __ST0, __ST1> Queryable<(__ST0, __ST1), __DB> for Dependency
Source§impl<__DB: Backend> Selectable<__DB> for Dependency
impl<__DB: Backend> Selectable<__DB> for Dependency
Source§type SelectExpression = (dependent_id, dependency_id)
type SelectExpression = (dependent_id, dependency_id)
The expression you’d like to select. Read more
Source§fn construct_selection() -> Self::SelectExpression
fn construct_selection() -> Self::SelectExpression
Construct an instance of the expression
impl UndecoratedInsertRecord<table> for Dependency
Auto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
Source§fn as_select() -> SelectBy<T, DB>
fn as_select() -> SelectBy<T, DB>
Construct a select clause based on a
Selectable implementation. Read moreSource§fn as_returning() -> SelectBy<Self, DB>
fn as_returning() -> SelectBy<Self, DB>
An alias for
as_select that can be used with returning clausesSource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
Source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.