pub struct Client { /* private fields */ }Expand description
Client for AWS Continuum
Client for invoking operations on AWS Continuum. Each operation on AWS Continuum is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_continuum::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_continuum::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AssociateCollector operation has
a Client::associate_collector, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_collector()
.environment_id("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
§Waiters
This client provides wait_until methods behind the Waiters trait.
To use them, simply import the trait, and then call one of the wait_until methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait method can be called to initiate waiting.
For example, if there was a wait_until_thing method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_collector(&self) -> AssociateCollectorFluentBuilder
pub fn associate_collector(&self) -> AssociateCollectorFluentBuilder
Constructs a fluent builder for the AssociateCollector operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the Environment making the association.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Caller-provided token that makes retried association requests idempotent. The first successful request binds the token to the complete Collector ARN, supplied role, and result for at least 24 hours. During that retry window, reusing it with a different request fails with ConflictException. A matching replay still requires the supplied role to have current Collector access. Once authorized, a matching replay returns the stored result without changing association state. Revocation can deny a replay; it does not remove the stored association or its original result.collector_arn(impl Into<String>)/set_collector_arn(Option<String>):
required: true
The ARN of the Collector to associate with this Environment.collector_data_access_role_arn(impl Into<String>)/set_collector_data_access_role_arn(Option<String>):
required: true
IAM role in the Environment account that Continuum assumes before authorizing access to associated Collector inventory. Every association, including a same-account association, requires this role. The supplied ARN replaces the Environment’s previously stored role. The customer is responsible for granting the role access to every Collector that should contribute data.
- On success, responds with
AssociateCollectorOutputwith field(s):environment_id(String): The unique identifier of the Environment making the association.environment_arn(String): The ARN of the Environment making the association.associated_collector(Option<AssociatedCollector>): The Collector identifier and ARN validated by this operation.
- On failure, responds with
SdkError<AssociateCollectorError>
Source§impl Client
impl Client
Sourcepub fn create_code_finding(&self) -> CreateCodeFindingFluentBuilder
pub fn create_code_finding(&self) -> CreateCodeFindingFluentBuilder
Constructs a fluent builder for the CreateCodeFinding operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment to ingest the finding into.ocsf_document(Document)/set_ocsf_document(Option<Document>):
required: true
The OCSF finding document to ingest, verbatim. Must declare a class_uid Continuum supports (2002 Vulnerability Finding, or 2007 Application Security Posture Finding) and validate against the vendored OCSF JSON Schema for that class, including the Continuum overlay requirements that finding_info.uid be present and that vulnerabilities[0].affected_code[0].file identify the code location. With several repositories in the environment, the file path must begin with the repository name. Maximum size 256 KB. Stored verbatim and normalized into the typed Finding members returned by GetCodeFinding. GetCodeFinding does not return the document itself.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Caller-provided idempotency token. A retry with the same token and an identical finding document replays the original result; the same token with different content is rejected.
- On success, responds with
CreateCodeFindingOutputwith field(s):finding_id(String): The unique identifier assigned to the finding.finding_arn(String): The ARN of the ingested finding.title(String): The title extracted from the submitted document. Always populated at ingestion.status(FindingStatus): The finding’s current lifecycle status – SUBMITTED for a newly ingested finding, or the finding’s present status when an idempotent retry replays an already-processed finding.created_at(DateTime): The timestamp when the finding was ingested.
- On failure, responds with
SdkError<CreateCodeFindingError>
Source§impl Client
impl Client
Sourcepub fn create_code_scan(&self) -> CreateCodeScanFluentBuilder
pub fn create_code_scan(&self) -> CreateCodeScanFluentBuilder
Constructs a fluent builder for the CreateCodeScan operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
Environment to scan.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
An optional token identifying one scan request for this environment. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request, so each request without a token starts a new scan. To retry a request after a lost response, supply the same token on the same environment; once a request with that token has succeeded, a retry returns the original scan. Concurrent requests with the same token, or a retry after a request that failed partway through, can leave an additional scan, which may end FAILED as superseded. A token is bound to its scan for as long as the service retains the scan’s build record, with no shorter expiry. Deleting the environment makes the binding inaccessible: a later request with the token returns ResourceNotFoundException.
- On success, responds with
CreateCodeScanOutputwith field(s):scan(Option<CodeScanSummary>): The scan run this request created, or the scan run a previous request with the same clientToken already accepted.
- On failure, responds with
SdkError<CreateCodeScanError>
Source§impl Client
impl Client
Sourcepub fn create_collector(&self) -> CreateCollectorFluentBuilder
pub fn create_collector(&self) -> CreateCollectorFluentBuilder
Constructs a fluent builder for the CreateCollector operation.
- The fluent builder is configurable:
r#type(CollectorType)/set_type(Option<CollectorType>):
required: false
Source to collect. Defaults to AWS_COLLECTOR when omitted.kubernetes_cluster_role(KubernetesClusterRoleConfiguration)/set_kubernetes_cluster_role(Option<KubernetesClusterRoleConfiguration>):
required: false
IAM role configuration used to collect Kubernetes cluster metadata. The authenticated caller must be allowed to pass its exact roleArn to Continuum.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
Caller-provided token that makes retried create requests return the original Collector rather than creating a duplicate.
- On success, responds with
CreateCollectorOutputwith field(s):collector_id(String): The unique identifier assigned to the Collector.collector_arn(String): The ARN of the created Collector.r#type(CollectorType): The source collected by this Collector.status(CollectorStatus): The current lifecycle status.created_at(DateTime): The timestamp when the Collector was created.
- On failure, responds with
SdkError<CreateCollectorError>
Source§impl Client
impl Client
Sourcepub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
pub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
Constructs a fluent builder for the CreateEnvironment operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: true
The customer-visible name of the environment.configuration(CreateEnvironmentConfiguration)/set_configuration(Option<CreateEnvironmentConfiguration>):
required: false
Type-specific configuration. Omission creates a code environment with the default operating policy and no sources.
- On success, responds with
CreateEnvironmentOutputwith field(s):environment_id(String): The unique identifier assigned to the environment.environment_arn(String): The ARN of the created environment.status(EnvironmentStatus): The initial status of the environment. Always ACTIVE on successful creation.created_at(DateTime): The timestamp when the environment was created.
- On failure, responds with
SdkError<CreateEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn create_integration(&self) -> CreateIntegrationFluentBuilder
pub fn create_integration(&self) -> CreateIntegrationFluentBuilder
Constructs a fluent builder for the CreateIntegration operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
An optional token identifying one create attempt within the caller’s account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.name(impl Into<String>)/set_name(Option<String>):
required: true
The name for the integration.provider_configuration(ProviderConfiguration)/set_provider_configuration(Option<ProviderConfiguration>):
required: true
The provider-specific configuration required to create the integration. Only one member may be specified.
- On success, responds with
CreateIntegrationOutputwith field(s):integration_id(String): The unique identifier of the created integration.integration_arn(String): The ARN of the created integration.created_at(DateTime): The timestamp when the integration was created.
- On failure, responds with
SdkError<CreateIntegrationError>
Source§impl Client
impl Client
Sourcepub fn delete_collector(&self) -> DeleteCollectorFluentBuilder
pub fn delete_collector(&self) -> DeleteCollectorFluentBuilder
Constructs a fluent builder for the DeleteCollector operation.
- The fluent builder is configurable:
collector_id(impl Into<String>)/set_collector_id(Option<String>):
required: true
The unique identifier of the Collector to delete.
- On success, responds with
DeleteCollectorOutput - On failure, responds with
SdkError<DeleteCollectorError>
Source§impl Client
impl Client
Sourcepub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
pub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
Constructs a fluent builder for the DeleteEnvironment operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the environment to delete.
- On success, responds with
DeleteEnvironmentOutput - On failure, responds with
SdkError<DeleteEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn delete_integration(&self) -> DeleteIntegrationFluentBuilder
pub fn delete_integration(&self) -> DeleteIntegrationFluentBuilder
Constructs a fluent builder for the DeleteIntegration operation.
- The fluent builder is configurable:
integration_id(impl Into<String>)/set_integration_id(Option<String>):
required: true
The unique identifier of the integration to delete.
- On success, responds with
DeleteIntegrationOutput - On failure, responds with
SdkError<DeleteIntegrationError>
Source§impl Client
impl Client
Sourcepub fn disassociate_collector(&self) -> DisassociateCollectorFluentBuilder
pub fn disassociate_collector(&self) -> DisassociateCollectorFluentBuilder
Constructs a fluent builder for the DisassociateCollector operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the Environment whose associations are updated.collector_arn(impl Into<String>)/set_collector_arn(Option<String>):
required: true
The ARN of the Collector to disassociate from this Environment.
- On success, responds with
DisassociateCollectorOutput - On failure, responds with
SdkError<DisassociateCollectorError>
Source§impl Client
impl Client
Sourcepub fn get_code_finding(&self) -> GetCodeFindingFluentBuilder
pub fn get_code_finding(&self) -> GetCodeFindingFluentBuilder
Constructs a fluent builder for the GetCodeFinding operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment that owns the finding.finding_id(impl Into<String>)/set_finding_id(Option<String>):
required: true
The unique identifier of the finding to retrieve.
- On success, responds with
GetCodeFindingOutputwith field(s):r#type(FindingType): What kind of finding this is. Determines which of the type-specific members below are populated.title(String): The producer’s title for the finding.severity(FindingSeverityId): The finding’s severity.summary(Option<String>): A one-paragraph description.detailed_description(Option<String>): The full analysis.category(Option<String>): The producer’s vulnerability category. Not a stable filter key across finding types – see FindingCategory.sub_category(Option<String>): A more specific classification withincategory.cwe_ids(Option<Vec::<String>>): CWE identifiers classifying the finding.owasp_category(Option<String>): The OWASP Top 10 category, when the producer supplies one.mitigation(Option<String>): How to fix the finding.file_path(Option<String>): The file the finding is about.line_number(Option<i32>): The 1-indexed line the finding is about. Bounds are enforced server-side rather than by a constraint trait: a numeric constraint generates a distinct newtype per enclosing structure, so the same concept would not share a type across the create input and the read output.cve_id(Option<String>): The CVE this finding reports, for software-composition findings. Both code types can carry one: a customer document supplies it under vulnerabilities[].cve, and Continuum’s scanner reports CVEs for dependency-manifest findings.cvss_base_score(Option<f64>): The CVSS base score accompanyingcveId, when the producer supplies one, from 0.0 to 10.0. Not computed by Continuum. The range is enforced server-side, not by a @range trait – the smithy-rs server SDK does not support range constraints on double shapes (smithy-rs#2007).affected_packages(Option<Vec::<AffectedPackage>>): Packages implicated by the finding.vulnerable_code(Option<String>): The vulnerable code fragment.relevant_inputs(Option<Vec::<String>>): User-controlled inputs that reach the vulnerability.steps_to_reproduce(Option<Vec::<String>>): Steps to reproduce or exploit the finding.validation(Option<FindingValidation>): The validator’s assessment. Absent when no validation ran.end_line(Option<i32>): The last line of the affected range, from the document’s affected_code[].end_line.mitre_techniques(Option<Vec::<String>>): MITRE ATT&CK technique identifiers, from the document’s finding_info.attacks[].technique.uid.remediation_references(Option<Vec::<String>>): Remediation references, from the document’s vulnerabilities[].remediation.references.ocsf_class(Option<FindingOcsfClass>): The OCSF class the document declared. Determines whetherpostureis populated.ocsf_schema_version(Option<String>): The OCSF schema version the producer wrote against (metadata.version).product_name(Option<String>): The producing product and vendor (metadata.product).product_vendor_name(Option<String>): A vulnerability-taxonomy label: the producer’s category, sub-category, or OWASP category. Deliberately unconstrained beyond length – producers do not share a taxonomy, so this is NOT a stable filter key across finding types. UsecweIdswhen a stable classification is needed.product_version(Option<String>): A vulnerability-taxonomy label: the producer’s category, sub-category, or OWASP category. Deliberately unconstrained beyond length – producers do not share a taxonomy, so this is NOT a stable filter key across finding types. UsecweIdswhen a stable classification is needed.source_status(Option<String>): The producer’s own status for the finding, and the enum value behind it. Distinct fromstatus, which is Continuum’s lifecycle state – a producer may call a finding “New” while Continuum has it SUBMITTED.source_status_id(Option<i32>): The producer’s numeric enum value forsourceStatus.first_seen_at(Option<DateTime>): When the producer first observed the finding (finding_info.first_seen_time). The producer’s own clock, not Continuum’s.finding_types(Option<Vec::<String>>): The producer’s own classification of the finding (finding_info.types).vulnerabilities(Option<Vec::<FindingVulnerability>>): Every vulnerability the document reported. A document may report several; the flatcveId/cvssBaseScore/filePath/lineNumbermembers above carry the first one’s identity so a caller that only needs “what and where” does not have to walk this list.resources(Option<Vec::<FindingResource>>): Resources the document named (resources[]).posture(Option<FindingPosture>): The compliance posture, for an Application Security Posture Finding. Absent for a vulnerability finding.finding_id(String): The unique identifier of the finding.finding_arn(String): The ARN of the finding.environment_id(String): The environment that owns the finding.source(String): The system that produced the finding.source_finding_id(String): The producer’s own identifier for the finding.reported_at(DateTime): When the producer reported the finding – its own clock, which is not Continuum’s ingestion time.createdAtis when Continuum accepted it; these are genuinely different instants and a reader usually wants this one. For CreateCodeFinding, this is the submitted OCSF document’s own top-leveltime. For findings Continuum’s scanner produces, it is the finding’s own creation time. Continuum does not validate it for plausibility: a producer’s value is echoed as given, so atimestamphere asserts the unit and format, not that the instant is genuine.status(FindingStatus): The current lifecycle status of the finding.status_updated_at(DateTime): The timestamp when the status last transitioned.created_at(DateTime): The timestamp when the finding was ingested.scan_run_id(Option<String>): The scan that produced the finding, when it came from one. For a finding Continuum’s scanner produced, this is the Continuum scan run (see GetCodeScan). For a finding submitted with CreateCodeFinding, it is the OCSF document’smetadata.correlation_uid, when that value is a valid ScanRunId. Absent when the finding did not come from a scan.status_message(Option<String>): Human-readable context about the current status.discard_reason(Option<FindingDiscardReason>): Why the finding was not escalated. Present only when status is DISCARDED.discard_reasoning(Option<String>): Customer-facing explanation accompanyingdiscardReason.duplicate_of_issue_id(Option<String>): The existing issue this finding duplicates. Present only for the DUPLICATE_OF_* discard reasons.created_issue_id(Option<String>): The issue Continuum created from this finding.completed_at(Option<DateTime>): When processing finished, whether by creating an issue or discarding. Absent while the finding is still in flight.
- On failure, responds with
SdkError<GetCodeFindingError>
Source§impl Client
impl Client
Sourcepub fn get_code_issue(&self) -> GetCodeIssueFluentBuilder
pub fn get_code_issue(&self) -> GetCodeIssueFluentBuilder
Constructs a fluent builder for the GetCodeIssue operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment that owns the issue.issue_id(impl Into<String>)/set_issue_id(Option<String>):
required: true
The unique identifier of the issue to retrieve.
- On success, responds with
GetCodeIssueOutputwith field(s):issue_id(String): The unique identifier of the issue.issue_arn(String): The ARN of the issue.name(String): The name of the issue.synopsis(String): A free-form synopsis of the issue.severity(Option<IssueSeverity>): Current severity: the FindingSeverity seed at create, overwritten by the authoritative severity that prioritization assigns after validation.confidence(Option<i32>): The likelihood that this issue is a true positive, expressed as a percentage (0-100).severity_reasoning(Option<String>): The justification for the current severity. Always leads with a customer-facing basis clause synthesized from how the severity was determined (e.g. “Severity from finding.”, “Severity from Continuum system.”); when prioritization has run, its own reasoning follows. Issues created before the basis clause was introduced return their original reasoning without it.summary(Option<String>): The remediation completion summary, when the green stage has run.finding_ids(Vec::<String>): The findings that motivated this issue. Bare identifiers only – a caller authorized for GetCodeIssue is not necessarily authorized to read finding detail; call GetCodeFinding for that. Every referenced finding is included regardless of origin (both CustomerUploaded and ContinuumScanner).status(IssueStatus): The current lifecycle status of the issue.phase(Option<IssuePhase>): The part of the workflow the issue is in. Present when status is IN_PROGRESS, and when status is FAILED and the failing phase is known.status_reason(Option<IssueStatusReason>): Why the issue failed. Present only when status is FAILED.status_message(Option<String>): Customer-facing explanation of statusReason. Present only when status is FAILED.status_updated_at(DateTime): The timestamp when the status or phase last changed.created_at(DateTime): The timestamp when the issue was created.updated_at(Option<DateTime>): The timestamp when any field of the issue last changed. Advances on every mutation (including score-only updates that do not transition status), so it is greater than or equal to statusUpdatedAt.evidence_availability(Option<IssueEvidenceAvailability>): Whether the issue has any attached evidence (formerly ‘artifacts’: tool output, remediation proposals, patches). NONE = no evidence; AVAILABLE = at least one evidence item exists. Computed at read time.patch_delivery(Option<IssuePatchDelivery>): Customer delivery of the issue’s patches, summarized from its PATCH artifacts at read time. Absent when no patch has a destination delivery.
- On failure, responds with
SdkError<GetCodeIssueError>
Source§impl Client
impl Client
Sourcepub fn get_code_issue_artifact(&self) -> GetCodeIssueArtifactFluentBuilder
pub fn get_code_issue_artifact(&self) -> GetCodeIssueArtifactFluentBuilder
Constructs a fluent builder for the GetCodeIssueArtifact operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment that owns the issue.issue_id(impl Into<String>)/set_issue_id(Option<String>):
required: true
The issue the artifact is attached to.artifact_id(impl Into<String>)/set_artifact_id(Option<String>):
required: true
The unique identifier of the artifact to retrieve.
- On success, responds with
GetCodeIssueArtifactOutputwith field(s):artifact_id(String): The unique identifier of the artifact.artifact_type(IssueArtifactType): Semantic category of the artifact.media_type(String): MIME type the producer declared for its content.body(Option<IssueArtifactBody>): The artifact body, projected against the shape defined for its artifactType. A type with a defined shape is returned as that structure, and anything else throughIssueArtifactBody.raw.metadata(Option<Document>): Producer-defined structured metadata, when the producer supplied any. Returned only for an artifactType whose content has no defined shape, so that the artifact stays inspectable. For an artifactType with a defined shape,bodycarries the content and this member is omitted.producer(Option<IssueArtifactProducerSummary>): The agent that produced the artifact.created_at(DateTime): The timestamp when the artifact was created.
- On failure, responds with
SdkError<GetCodeIssueArtifactError>
Source§impl Client
impl Client
Sourcepub fn get_code_scan(&self) -> GetCodeScanFluentBuilder
pub fn get_code_scan(&self) -> GetCodeScanFluentBuilder
Constructs a fluent builder for the GetCodeScan operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
Environment that owns the scan.scan_run_id(impl Into<String>)/set_scan_run_id(Option<String>):
required: true
Scan to retrieve.
- On success, responds with
GetCodeScanOutputwith field(s):scan(Option<CodeScanData>): Complete customer-visible scan data.
- On failure, responds with
SdkError<GetCodeScanError>
Source§impl Client
impl Client
Sourcepub fn get_collector(&self) -> GetCollectorFluentBuilder
pub fn get_collector(&self) -> GetCollectorFluentBuilder
Constructs a fluent builder for the GetCollector operation.
- The fluent builder is configurable:
collector_id(impl Into<String>)/set_collector_id(Option<String>):
required: true
The unique identifier of the Collector to retrieve.
- On success, responds with
GetCollectorOutputwith field(s):collector_id(String): The unique identifier of the Collector.collector_arn(String): The ARN of the Collector.r#type(CollectorType): The source collected by this Collector.status(CollectorStatus): The current lifecycle status.config_recorder_arn(Option<String>): The ARN of the provisioned AWS Config Recorder.kubernetes_cluster_role_arn(Option<String>): IAM role used to collect Kubernetes cluster metadata.created_at(DateTime): The timestamp when the Collector was created.updated_at(DateTime): The time of the last successful UpdateCollector call, returned at whole-second precision in the same date-time format as createdAt.
- On failure, responds with
SdkError<GetCollectorError>
Source§impl Client
impl Client
Constructs a fluent builder for the GetCollectorDataAccessAuthorization operation.
- The fluent builder is configurable:
account_id(impl Into<String>)/set_account_id(Option<String>):
required: true
The AWS account that owns the Collector.collector_id(impl Into<String>)/set_collector_id(Option<String>):
required: true
The unique identifier of the Collector.environment_arn(impl Into<String>)/set_environment_arn(Option<String>):
required: false
The full ARN of the Environment requesting the Collector’s data. The Environment must be in the caller’s account. Continuum supplies this value as the continuum:EnvironmentArn condition key.
- On success, responds with
GetCollectorDataAccessAuthorizationOutput - On failure, responds with
SdkError<GetCollectorDataAccessAuthorizationError>
Source§impl Client
impl Client
Sourcepub fn get_environment(&self) -> GetEnvironmentFluentBuilder
pub fn get_environment(&self) -> GetEnvironmentFluentBuilder
Constructs a fluent builder for the GetEnvironment operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the environment to retrieve.
- On success, responds with
GetEnvironmentOutputwith field(s):environment_id(String): The unique identifier of the environment.environment_arn(String): The ARN of the environment.name(String): The customer-visible name of the environment.status(EnvironmentStatus): The current operational status of the environment.status_message(Option<String>): Human-readable details about the current status. Present when the status requires additional context (e.g., failure reason).status_updated_at(DateTime): The timestamp when the status last transitioned.created_at(DateTime): The timestamp when the environment was created.updated_at(DateTime): The timestamp when the environment’s properties were last updated.configuration(Option<EnvironmentConfigurationDetails>): Type-specific configuration and state, including code sources, operating policy, Collector details, and the latest scan.
- On failure, responds with
SdkError<GetEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn get_integration(&self) -> GetIntegrationFluentBuilder
pub fn get_integration(&self) -> GetIntegrationFluentBuilder
Constructs a fluent builder for the GetIntegration operation.
- The fluent builder is configurable:
integration_id(impl Into<String>)/set_integration_id(Option<String>):
required: true
The unique identifier of the integration to retrieve.
- On success, responds with
GetIntegrationOutputwith field(s):integration_id(String): The unique identifier of the integration.integration_arn(String): The ARN of the integration.name(String): The name of the integration.integration_type(IntegrationType): The immutable provider type for the integration.provider_details(Option<ProviderDetails>): Provider-specific details for the integration.created_at(DateTime): The timestamp when the integration was created.updated_at(DateTime): The timestamp when the integration was last updated.
- On failure, responds with
SdkError<GetIntegrationError>
Source§impl Client
impl Client
Sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: true
The ARN of a resource in the caller’s account.
- On success, responds with
GetResourcePolicyOutputwith field(s):arn(String): The ARN of a Continuum resource that supports a resource policy. Collectors are the only supported resource type; other well-formed Continuum ARNs are rejected with ValidationException.policy(String): A resource policy in displayable JSON form.revision_id(String): Opaque optimistic-concurrency token for a resource policy.
- On failure, responds with
SdkError<GetResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn list_associated_collectors(
&self,
) -> ListAssociatedCollectorsFluentBuilder
pub fn list_associated_collectors( &self, ) -> ListAssociatedCollectorsFluentBuilder
Constructs a fluent builder for the ListAssociatedCollectors operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the Environment whose associations to list.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum number of associated Collectors to return.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token returned by a prior request.
- On success, responds with
ListAssociatedCollectorsOutputwith field(s):associated_collectors(Vec::<AssociatedCollector>): The Collectors associated with this Environment, ordered by collectorId ascending. Empty when the Environment has no associations, and also when every association on the page predates Continuum persisting the ARN — the page is still advanced bynextTokenin that case.next_token(Option<String>): Pagination token for the next page, if present.
- On failure, responds with
SdkError<ListAssociatedCollectorsError>
Source§impl Client
impl Client
Sourcepub fn list_associated_environments(
&self,
) -> ListAssociatedEnvironmentsFluentBuilder
pub fn list_associated_environments( &self, ) -> ListAssociatedEnvironmentsFluentBuilder
Constructs a fluent builder for the ListAssociatedEnvironments operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
collector_id(impl Into<String>)/set_collector_id(Option<String>):
required: true
The unique identifier of the Collector whose associations to list.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum number of Environment associations to return.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token returned by a prior request.
- On success, responds with
ListAssociatedEnvironmentsOutputwith field(s):associated_environments(Vec::<AssociatedEnvironment>): Summaries of the Environments associated with this Collector, ordered by environmentArn lexicographically ascending. Each summary has the same fields as a ListEnvironments item but uses an independent model shape. Empty when the Collector has no associations.next_token(Option<String>): Pagination token for the next page, if present.
- On failure, responds with
SdkError<ListAssociatedEnvironmentsError>
Source§impl Client
impl Client
Sourcepub fn list_code_findings(&self) -> ListCodeFindingsFluentBuilder
pub fn list_code_findings(&self) -> ListCodeFindingsFluentBuilder
Constructs a fluent builder for the ListCodeFindings operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment whose findings to list.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of results to return in a single call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
- On success, responds with
ListCodeFindingsOutputwith field(s):items(Vec::<FindingSummary>): The findings in the environment, ordered by findingId descending.next_token(Option<String>): A pagination token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListCodeFindingsError>
Source§impl Client
impl Client
Sourcepub fn list_code_issue_artifacts(&self) -> ListCodeIssueArtifactsFluentBuilder
pub fn list_code_issue_artifacts(&self) -> ListCodeIssueArtifactsFluentBuilder
Constructs a fluent builder for the ListCodeIssueArtifacts operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment that owns the issue.issue_id(impl Into<String>)/set_issue_id(Option<String>):
required: true
The issue whose artifacts to list.artifact_type(IssueArtifactType)/set_artifact_type(Option<IssueArtifactType>):
required: false
Optional filter for a semantic artifact category. Omit to list all artifacts attached to the issue.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of results to return in a single call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
- On success, responds with
ListCodeIssueArtifactsOutputwith field(s):items(Vec::<IssueArtifactItem>): The artifacts attached to the issue, ordered by artifactId descending.next_token(Option<String>): A pagination token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListCodeIssueArtifactsError>
Source§impl Client
impl Client
Sourcepub fn list_code_issues(&self) -> ListCodeIssuesFluentBuilder
pub fn list_code_issues(&self) -> ListCodeIssuesFluentBuilder
Constructs a fluent builder for the ListCodeIssues operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The environment whose issues to list.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of results to return in a single call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
- On success, responds with
ListCodeIssuesOutputwith field(s):items(Vec::<IssueSummary>): The issues in the environment, ordered by issueId descending.next_token(Option<String>): A pagination token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListCodeIssuesError>
Source§impl Client
impl Client
Sourcepub fn list_code_scans(&self) -> ListCodeScansFluentBuilder
pub fn list_code_scans(&self) -> ListCodeScansFluentBuilder
Constructs a fluent builder for the ListCodeScans operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
Environment whose scans to list.max_results(i32)/set_max_results(Option<i32>):
required: false
Maximum number of scans to return.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
Pagination token returned by a prior request.
- On success, responds with
ListCodeScansOutputwith field(s):scans(Vec::<CodeScanSummary>): Customer-visible scans ordered by scanRunId descending.next_token(Option<String>): Pagination token for the next page, if present.
- On failure, responds with
SdkError<ListCodeScansError>
Source§impl Client
impl Client
Sourcepub fn list_collectors(&self) -> ListCollectorsFluentBuilder
pub fn list_collectors(&self) -> ListCollectorsFluentBuilder
Constructs a fluent builder for the ListCollectors operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
ListCollectorsOutputwith field(s):items(Vec::<CollectorSummary>): The Collectors owned by the authenticated caller’s account. At most one result is currently returned, so no result ordering applies.
- On failure, responds with
SdkError<ListCollectorsError>
Source§impl Client
impl Client
Sourcepub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
pub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
Constructs a fluent builder for the ListEnvironments operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of results to return in a single call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
- On success, responds with
ListEnvironmentsOutputwith field(s):items(Vec::<EnvironmentListEntry>): Common metadata for the environments in the account, ordered by environmentId descending.next_token(Option<String>): A pagination token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListEnvironmentsError>
Source§impl Client
impl Client
Sourcepub fn list_integrations(&self) -> ListIntegrationsFluentBuilder
pub fn list_integrations(&self) -> ListIntegrationsFluentBuilder
Constructs a fluent builder for the ListIntegrations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of results to return in a single call.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
A pagination token returned by a previous call. Set to null for the first request; use the returned token for subsequent calls.
- On success, responds with
ListIntegrationsOutputwith field(s):items(Vec::<IntegrationSummary>): The integrations in the account, ordered by integrationId descending.next_token(Option<String>): A pagination token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListIntegrationsError>
Source§impl Client
impl Client
Sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):
required: true
The ARN of a resource in the caller’s account.policy(impl Into<String>)/set_policy(Option<String>):
required: false
Omit or supply an empty Statement array to clear resource-policy grants and store the canonical empty-statement policy. Cross-account access is denied; same-account access remains subject to identity policies. Use an explicit Deny statement to deny same-account principals too.expected_revision_id(impl Into<String>)/set_expected_revision_id(Option<String>):
required: false
Optional optimistic-concurrency token for the currently observed policy.
- On success, responds with
PutResourcePolicyOutputwith field(s):arn(String): The ARN of a Continuum resource that supports a resource policy. Collectors are the only supported resource type; other well-formed Continuum ARNs are rejected with ValidationException.policy(String): A resource policy in displayable JSON form.revision_id(String): Opaque optimistic-concurrency token for a resource policy.
- On failure, responds with
SdkError<PutResourcePolicyError>
Source§impl Client
impl Client
Constructs a fluent builder for the StartIntegrationAuthorization operation.
- The fluent builder is configurable:
provider_type(IntegrationAuthorizationProviderType)/set_provider_type(Option<IntegrationAuthorizationProviderType>):
required: true
The provider to authorize. Only GITHUB is supported.name(impl Into<String>)/set_name(Option<String>):
required: false
The name the integration will be created with. When specified, the request fails with ConflictException if an integration with this name already exists in the account, before the caller leaves for the provider. The name is only checked: it is not reserved, stored, or authorized. CreateIntegration requires its own name, checks it again, and may use a different one.
- On success, responds with
StartIntegrationAuthorizationOutputwith field(s):state(String): An opaque value to send as the OAuthstateparameter. Pass the value the provider returns in its callback to CreateIntegration asauthorization.state.code_challenge(String): The PKCE code challenge to send as the OAuthcode_challengeparameter.code_challenge_method(OAuthCodeChallengeMethod): The PKCE challenge method to send as the OAuthcode_challenge_methodparameter.expires_at(DateTime): The time after which CreateIntegration no longer accepts this authorization.
- On failure, responds with
SdkError<StartIntegrationAuthorizationError>
Source§impl Client
impl Client
Sourcepub fn update_collector(&self) -> UpdateCollectorFluentBuilder
pub fn update_collector(&self) -> UpdateCollectorFluentBuilder
Constructs a fluent builder for the UpdateCollector operation.
- The fluent builder is configurable:
collector_id(impl Into<String>)/set_collector_id(Option<String>):
required: true
The unique identifier of the Collector to update.name(impl Into<String>)/set_name(Option<String>):
required: false
The new customer-visible name.kubernetes_cluster_role(KubernetesClusterRoleUpdate)/set_kubernetes_cluster_role(Option<KubernetesClusterRoleUpdate>):
required: false
Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
- On success, responds with
UpdateCollectorOutputwith field(s):collector_id(String): The unique identifier of the updated Collector.collector_arn(String): The ARN of the updated Collector.r#type(CollectorType): The source collected by this Collector.status(CollectorStatus): The current lifecycle status.config_recorder_arn(Option<String>): The ARN of the provisioned AWS Config Recorder.kubernetes_cluster_role_arn(Option<String>): IAM role used to collect Kubernetes cluster metadata.created_at(DateTime): The timestamp when the Collector was created.updated_at(DateTime): The time of the last successful UpdateCollector call, returned at whole-second precision in the same date-time format as createdAt.
- On failure, responds with
SdkError<UpdateCollectorError>
Source§impl Client
impl Client
Sourcepub fn update_environment(&self) -> UpdateEnvironmentFluentBuilder
pub fn update_environment(&self) -> UpdateEnvironmentFluentBuilder
Constructs a fluent builder for the UpdateEnvironment operation.
- The fluent builder is configurable:
environment_id(impl Into<String>)/set_environment_id(Option<String>):
required: true
The unique identifier of the environment to update.name(impl Into<String>)/set_name(Option<String>):
required: false
The new customer-visible name.configuration(UpdateEnvironmentConfiguration)/set_configuration(Option<UpdateEnvironmentConfiguration>):
required: false
Type-specific configuration changes. Omission preserves the configuration.
- On success, responds with
UpdateEnvironmentOutputwith field(s):environment_id(String): The unique identifier of the updated environment.environment_arn(String): The ARN of the updated environment.name(String): The current customer-visible name of the environment.status(EnvironmentStatus): The current operational status of the environment.status_message(Option<String>): Human-readable details about the current status.status_updated_at(DateTime): The timestamp when the status last transitioned. Uses the existing GetEnvironment/ListEnvironments ISO-8601 wire format for this field.created_at(DateTime): The timestamp when the environment was created. Uses the existing GetEnvironment/ListEnvironments ISO-8601 wire format for this field.configuration(Option<EnvironmentConfigurationDetails>): Type-specific state, including Collector details and the latest scan. Read source and operating-policy settings through GetEnvironment.
- On failure, responds with
SdkError<UpdateEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn update_integration(&self) -> UpdateIntegrationFluentBuilder
pub fn update_integration(&self) -> UpdateIntegrationFluentBuilder
Constructs a fluent builder for the UpdateIntegration operation.
- The fluent builder is configurable:
integration_id(impl Into<String>)/set_integration_id(Option<String>):
required: true
The unique identifier of the S3 integration to update.provider_configuration(UpdateProviderConfiguration)/set_provider_configuration(Option<UpdateProviderConfiguration>):
required: true
The provider-specific changes to apply. The member must match the integration’s provider type, and only S3 integrations can be updated.
- On success, responds with
UpdateIntegrationOutputwith field(s):integration_id(String): The unique identifier for an Integration resource.integration_arn(String): The Amazon Resource Name (ARN) of an Integration resource, of the form arn:{partition}:continuum:{region}:{account}:integrations/{integrationId}.name(String): The name for an integration.integration_type(IntegrationType): The immutable provider type for an integration.provider_details(Option<ProviderDetails>): Provider-specific details for an integration. Only one member will be present.created_at(DateTime): When the integration was created.updated_at(DateTime): When the integration was last updated.
- On failure, responds with
SdkError<UpdateIntegrationError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_code_scan_succeeded(&self) -> CodeScanSucceededFluentBuilder
fn wait_until_code_scan_succeeded(&self) -> CodeScanSucceededFluentBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);