Struct dagger_sdk::Query

source ·
pub struct Query {
    pub proc: Arc<Child>,
    pub selection: Selection,
    pub conn: ConnectParams,
}

Fields§

§proc: Arc<Child>§selection: Selection§conn: ConnectParams

Implementations§

source§

impl Query

source

pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume

Constructs a cache volume for a given cache key.

Arguments
  • key - A string identifier to target this cache volume (e.g. “myapp-cache”).
source

pub fn container(&self) -> Container

Loads a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder’s host.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn container_opts(&self, opts: QueryContainerOpts) -> Container

Loads a container from ID. Null ID returns an empty container (scratch). Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder’s host.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub async fn default_platform(&self) -> Result<Platform>

The default platform of the builder.

source

pub fn directory(&self) -> Directory

Load a directory by ID. No argument produces an empty directory.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn directory_opts(&self, opts: QueryDirectoryOpts) -> Directory

Load a directory by ID. No argument produces an empty directory.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn file(&self, id: FileId) -> File

Loads a file by ID.

source

pub fn git(&self, url: impl Into<String>) -> GitRepository

Queries a git repository.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn git_opts( &self, url: impl Into<String>, opts: QueryGitOpts ) -> GitRepository

Queries a git repository.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn host(&self) -> Host

Queries the host environment.

source

pub fn http(&self, url: impl Into<String>) -> File

Returns a file containing an http remote url content.

source

pub fn pipeline(&self, name: impl Into<String>) -> Query

Creates a named sub-pipeline

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn pipeline_opts<'a>( &self, name: impl Into<String>, opts: QueryPipelineOpts<'a> ) -> Query

Creates a named sub-pipeline

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn project(&self, name: impl Into<String>) -> Project

Look up a project by name

source

pub fn secret(&self, id: SecretId) -> Secret

Loads a secret from its ID.

source

pub fn socket(&self) -> Socket

Loads a socket by its ID.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use
source

pub fn socket_opts(&self, opts: QuerySocketOpts) -> Socket

Loads a socket by its ID.

Arguments
  • opt - optional argument, see inner type for documentation, use _opts to use

Auto Trait Implementations§

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

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
source§

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

const: unstable · 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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