Struct dagger_sdk::Module
source · pub struct Module {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl Module
impl Module
sourcepub fn dependencies(&self) -> Vec<Module>
pub fn dependencies(&self) -> Vec<Module>
Modules used by this module
sourcepub async fn dependency_config(&self) -> Result<Vec<String>, DaggerError>
pub async fn dependency_config(&self) -> Result<Vec<String>, DaggerError>
The dependencies as configured by the module
sourcepub async fn description(&self) -> Result<String, DaggerError>
pub async fn description(&self) -> Result<String, DaggerError>
The doc string of the module, if any
sourcepub fn generated_code(&self) -> GeneratedCode
pub fn generated_code(&self) -> GeneratedCode
The code generated by the SDK’s runtime
sourcepub async fn id(&self) -> Result<ModuleId, DaggerError>
pub async fn id(&self) -> Result<ModuleId, DaggerError>
The ID of the module
sourcepub async fn name(&self) -> Result<String, DaggerError>
pub async fn name(&self) -> Result<String, DaggerError>
The name of the module
sourcepub async fn sdk(&self) -> Result<String, DaggerError>
pub async fn sdk(&self) -> Result<String, DaggerError>
The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK’s implementation.
sourcepub async fn serve(&self) -> Result<Void, DaggerError>
pub async fn serve(&self) -> Result<Void, DaggerError>
Serve a module’s API in the current session. Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
sourcepub fn source_directory(&self) -> Directory
pub fn source_directory(&self) -> Directory
The directory containing the module’s source code
sourcepub async fn source_directory_sub_path(&self) -> Result<String, DaggerError>
pub async fn source_directory_sub_path(&self) -> Result<String, DaggerError>
The module’s subpath within the source directory
sourcepub fn with_object(&self, object: TypeDef) -> Module
pub fn with_object(&self, object: TypeDef) -> Module
This module plus the given Object type and associated functions
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl Unpin for Module
impl !UnwindSafe for Module
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