#[non_exhaustive]pub struct DataSourceConfigurationBuilder { /* private fields */ }
Expand description
A builder for DataSourceConfiguration
.
Implementations§
Source§impl DataSourceConfigurationBuilder
impl DataSourceConfigurationBuilder
Sourcepub fn s3_configuration(self, input: S3DataSourceConfiguration) -> Self
pub fn s3_configuration(self, input: S3DataSourceConfiguration) -> Self
Provides the configuration information to connect to an Amazon S3 bucket as your data source.
Amazon Kendra now supports an upgraded Amazon S3 connector.
You must now use the TemplateConfiguration object instead of the S3DataSourceConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn set_s3_configuration(
self,
input: Option<S3DataSourceConfiguration>,
) -> Self
pub fn set_s3_configuration( self, input: Option<S3DataSourceConfiguration>, ) -> Self
Provides the configuration information to connect to an Amazon S3 bucket as your data source.
Amazon Kendra now supports an upgraded Amazon S3 connector.
You must now use the TemplateConfiguration object instead of the S3DataSourceConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn get_s3_configuration(&self) -> &Option<S3DataSourceConfiguration>
pub fn get_s3_configuration(&self) -> &Option<S3DataSourceConfiguration>
Provides the configuration information to connect to an Amazon S3 bucket as your data source.
Amazon Kendra now supports an upgraded Amazon S3 connector.
You must now use the TemplateConfiguration object instead of the S3DataSourceConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Provides the configuration information to connect to Microsoft SharePoint as your data source.
Provides the configuration information to connect to Microsoft SharePoint as your data source.
Provides the configuration information to connect to Microsoft SharePoint as your data source.
Sourcepub fn database_configuration(self, input: DatabaseConfiguration) -> Self
pub fn database_configuration(self, input: DatabaseConfiguration) -> Self
Provides the configuration information to connect to a database as your data source.
Sourcepub fn set_database_configuration(
self,
input: Option<DatabaseConfiguration>,
) -> Self
pub fn set_database_configuration( self, input: Option<DatabaseConfiguration>, ) -> Self
Provides the configuration information to connect to a database as your data source.
Sourcepub fn get_database_configuration(&self) -> &Option<DatabaseConfiguration>
pub fn get_database_configuration(&self) -> &Option<DatabaseConfiguration>
Provides the configuration information to connect to a database as your data source.
Sourcepub fn salesforce_configuration(self, input: SalesforceConfiguration) -> Self
pub fn salesforce_configuration(self, input: SalesforceConfiguration) -> Self
Provides the configuration information to connect to Salesforce as your data source.
Sourcepub fn set_salesforce_configuration(
self,
input: Option<SalesforceConfiguration>,
) -> Self
pub fn set_salesforce_configuration( self, input: Option<SalesforceConfiguration>, ) -> Self
Provides the configuration information to connect to Salesforce as your data source.
Sourcepub fn get_salesforce_configuration(&self) -> &Option<SalesforceConfiguration>
pub fn get_salesforce_configuration(&self) -> &Option<SalesforceConfiguration>
Provides the configuration information to connect to Salesforce as your data source.
Sourcepub fn one_drive_configuration(self, input: OneDriveConfiguration) -> Self
pub fn one_drive_configuration(self, input: OneDriveConfiguration) -> Self
Provides the configuration information to connect to Microsoft OneDrive as your data source.
Sourcepub fn set_one_drive_configuration(
self,
input: Option<OneDriveConfiguration>,
) -> Self
pub fn set_one_drive_configuration( self, input: Option<OneDriveConfiguration>, ) -> Self
Provides the configuration information to connect to Microsoft OneDrive as your data source.
Sourcepub fn get_one_drive_configuration(&self) -> &Option<OneDriveConfiguration>
pub fn get_one_drive_configuration(&self) -> &Option<OneDriveConfiguration>
Provides the configuration information to connect to Microsoft OneDrive as your data source.
Sourcepub fn service_now_configuration(self, input: ServiceNowConfiguration) -> Self
pub fn service_now_configuration(self, input: ServiceNowConfiguration) -> Self
Provides the configuration information to connect to ServiceNow as your data source.
Sourcepub fn set_service_now_configuration(
self,
input: Option<ServiceNowConfiguration>,
) -> Self
pub fn set_service_now_configuration( self, input: Option<ServiceNowConfiguration>, ) -> Self
Provides the configuration information to connect to ServiceNow as your data source.
Sourcepub fn get_service_now_configuration(&self) -> &Option<ServiceNowConfiguration>
pub fn get_service_now_configuration(&self) -> &Option<ServiceNowConfiguration>
Provides the configuration information to connect to ServiceNow as your data source.
Sourcepub fn confluence_configuration(self, input: ConfluenceConfiguration) -> Self
pub fn confluence_configuration(self, input: ConfluenceConfiguration) -> Self
Provides the configuration information to connect to Confluence as your data source.
Sourcepub fn set_confluence_configuration(
self,
input: Option<ConfluenceConfiguration>,
) -> Self
pub fn set_confluence_configuration( self, input: Option<ConfluenceConfiguration>, ) -> Self
Provides the configuration information to connect to Confluence as your data source.
Sourcepub fn get_confluence_configuration(&self) -> &Option<ConfluenceConfiguration>
pub fn get_confluence_configuration(&self) -> &Option<ConfluenceConfiguration>
Provides the configuration information to connect to Confluence as your data source.
Sourcepub fn google_drive_configuration(self, input: GoogleDriveConfiguration) -> Self
pub fn google_drive_configuration(self, input: GoogleDriveConfiguration) -> Self
Provides the configuration information to connect to Google Drive as your data source.
Sourcepub fn set_google_drive_configuration(
self,
input: Option<GoogleDriveConfiguration>,
) -> Self
pub fn set_google_drive_configuration( self, input: Option<GoogleDriveConfiguration>, ) -> Self
Provides the configuration information to connect to Google Drive as your data source.
Sourcepub fn get_google_drive_configuration(
&self,
) -> &Option<GoogleDriveConfiguration>
pub fn get_google_drive_configuration( &self, ) -> &Option<GoogleDriveConfiguration>
Provides the configuration information to connect to Google Drive as your data source.
Sourcepub fn web_crawler_configuration(self, input: WebCrawlerConfiguration) -> Self
pub fn web_crawler_configuration(self, input: WebCrawlerConfiguration) -> Self
Provides the configuration information required for Amazon Kendra Web Crawler.
Sourcepub fn set_web_crawler_configuration(
self,
input: Option<WebCrawlerConfiguration>,
) -> Self
pub fn set_web_crawler_configuration( self, input: Option<WebCrawlerConfiguration>, ) -> Self
Provides the configuration information required for Amazon Kendra Web Crawler.
Sourcepub fn get_web_crawler_configuration(&self) -> &Option<WebCrawlerConfiguration>
pub fn get_web_crawler_configuration(&self) -> &Option<WebCrawlerConfiguration>
Provides the configuration information required for Amazon Kendra Web Crawler.
Sourcepub fn work_docs_configuration(self, input: WorkDocsConfiguration) -> Self
pub fn work_docs_configuration(self, input: WorkDocsConfiguration) -> Self
Provides the configuration information to connect to Amazon WorkDocs as your data source.
Sourcepub fn set_work_docs_configuration(
self,
input: Option<WorkDocsConfiguration>,
) -> Self
pub fn set_work_docs_configuration( self, input: Option<WorkDocsConfiguration>, ) -> Self
Provides the configuration information to connect to Amazon WorkDocs as your data source.
Sourcepub fn get_work_docs_configuration(&self) -> &Option<WorkDocsConfiguration>
pub fn get_work_docs_configuration(&self) -> &Option<WorkDocsConfiguration>
Provides the configuration information to connect to Amazon WorkDocs as your data source.
Sourcepub fn fsx_configuration(self, input: FsxConfiguration) -> Self
pub fn fsx_configuration(self, input: FsxConfiguration) -> Self
Provides the configuration information to connect to Amazon FSx as your data source.
Amazon Kendra now supports an upgraded Amazon FSx Windows connector.
You must now use the TemplateConfiguration object instead of the FsxConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn set_fsx_configuration(self, input: Option<FsxConfiguration>) -> Self
pub fn set_fsx_configuration(self, input: Option<FsxConfiguration>) -> Self
Provides the configuration information to connect to Amazon FSx as your data source.
Amazon Kendra now supports an upgraded Amazon FSx Windows connector.
You must now use the TemplateConfiguration object instead of the FsxConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn get_fsx_configuration(&self) -> &Option<FsxConfiguration>
pub fn get_fsx_configuration(&self) -> &Option<FsxConfiguration>
Provides the configuration information to connect to Amazon FSx as your data source.
Amazon Kendra now supports an upgraded Amazon FSx Windows connector.
You must now use the TemplateConfiguration object instead of the FsxConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn slack_configuration(self, input: SlackConfiguration) -> Self
pub fn slack_configuration(self, input: SlackConfiguration) -> Self
Provides the configuration information to connect to Slack as your data source.
Amazon Kendra now supports an upgraded Slack connector.
You must now use the TemplateConfiguration object instead of the SlackConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn set_slack_configuration(self, input: Option<SlackConfiguration>) -> Self
pub fn set_slack_configuration(self, input: Option<SlackConfiguration>) -> Self
Provides the configuration information to connect to Slack as your data source.
Amazon Kendra now supports an upgraded Slack connector.
You must now use the TemplateConfiguration object instead of the SlackConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn get_slack_configuration(&self) -> &Option<SlackConfiguration>
pub fn get_slack_configuration(&self) -> &Option<SlackConfiguration>
Provides the configuration information to connect to Slack as your data source.
Amazon Kendra now supports an upgraded Slack connector.
You must now use the TemplateConfiguration object instead of the SlackConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won't be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn box_configuration(self, input: BoxConfiguration) -> Self
pub fn box_configuration(self, input: BoxConfiguration) -> Self
Provides the configuration information to connect to Box as your data source.
Sourcepub fn set_box_configuration(self, input: Option<BoxConfiguration>) -> Self
pub fn set_box_configuration(self, input: Option<BoxConfiguration>) -> Self
Provides the configuration information to connect to Box as your data source.
Sourcepub fn get_box_configuration(&self) -> &Option<BoxConfiguration>
pub fn get_box_configuration(&self) -> &Option<BoxConfiguration>
Provides the configuration information to connect to Box as your data source.
Sourcepub fn quip_configuration(self, input: QuipConfiguration) -> Self
pub fn quip_configuration(self, input: QuipConfiguration) -> Self
Provides the configuration information to connect to Quip as your data source.
Sourcepub fn set_quip_configuration(self, input: Option<QuipConfiguration>) -> Self
pub fn set_quip_configuration(self, input: Option<QuipConfiguration>) -> Self
Provides the configuration information to connect to Quip as your data source.
Sourcepub fn get_quip_configuration(&self) -> &Option<QuipConfiguration>
pub fn get_quip_configuration(&self) -> &Option<QuipConfiguration>
Provides the configuration information to connect to Quip as your data source.
Sourcepub fn jira_configuration(self, input: JiraConfiguration) -> Self
pub fn jira_configuration(self, input: JiraConfiguration) -> Self
Provides the configuration information to connect to Jira as your data source.
Sourcepub fn set_jira_configuration(self, input: Option<JiraConfiguration>) -> Self
pub fn set_jira_configuration(self, input: Option<JiraConfiguration>) -> Self
Provides the configuration information to connect to Jira as your data source.
Sourcepub fn get_jira_configuration(&self) -> &Option<JiraConfiguration>
pub fn get_jira_configuration(&self) -> &Option<JiraConfiguration>
Provides the configuration information to connect to Jira as your data source.
Sourcepub fn git_hub_configuration(self, input: GitHubConfiguration) -> Self
pub fn git_hub_configuration(self, input: GitHubConfiguration) -> Self
Provides the configuration information to connect to GitHub as your data source.
Amazon Kendra now supports an upgraded GitHub connector.
You must now use the TemplateConfiguration object instead of the GitHubConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won’t be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn set_git_hub_configuration(
self,
input: Option<GitHubConfiguration>,
) -> Self
pub fn set_git_hub_configuration( self, input: Option<GitHubConfiguration>, ) -> Self
Provides the configuration information to connect to GitHub as your data source.
Amazon Kendra now supports an upgraded GitHub connector.
You must now use the TemplateConfiguration object instead of the GitHubConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won’t be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn get_git_hub_configuration(&self) -> &Option<GitHubConfiguration>
pub fn get_git_hub_configuration(&self) -> &Option<GitHubConfiguration>
Provides the configuration information to connect to GitHub as your data source.
Amazon Kendra now supports an upgraded GitHub connector.
You must now use the TemplateConfiguration object instead of the GitHubConfiguration
object to configure your connector.
Connectors configured using the older console and API architecture will continue to function as configured. However, you won’t be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.
We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.
Sourcepub fn alfresco_configuration(self, input: AlfrescoConfiguration) -> Self
👎Deprecated: Deprecated AlfrescoConfiguration in favor of TemplateConfiguration
pub fn alfresco_configuration(self, input: AlfrescoConfiguration) -> Self
Provides the configuration information to connect to Alfresco as your data source.
Support for AlfrescoConfiguration
ended May 2023. We recommend migrating to or using the Alfresco data source template schema / TemplateConfiguration API.
Sourcepub fn set_alfresco_configuration(
self,
input: Option<AlfrescoConfiguration>,
) -> Self
👎Deprecated: Deprecated AlfrescoConfiguration in favor of TemplateConfiguration
pub fn set_alfresco_configuration( self, input: Option<AlfrescoConfiguration>, ) -> Self
Provides the configuration information to connect to Alfresco as your data source.
Support for AlfrescoConfiguration
ended May 2023. We recommend migrating to or using the Alfresco data source template schema / TemplateConfiguration API.
Sourcepub fn get_alfresco_configuration(&self) -> &Option<AlfrescoConfiguration>
👎Deprecated: Deprecated AlfrescoConfiguration in favor of TemplateConfiguration
pub fn get_alfresco_configuration(&self) -> &Option<AlfrescoConfiguration>
Provides the configuration information to connect to Alfresco as your data source.
Support for AlfrescoConfiguration
ended May 2023. We recommend migrating to or using the Alfresco data source template schema / TemplateConfiguration API.
Sourcepub fn template_configuration(self, input: TemplateConfiguration) -> Self
pub fn template_configuration(self, input: TemplateConfiguration) -> Self
Provides a template for the configuration information to connect to your data source.
Sourcepub fn set_template_configuration(
self,
input: Option<TemplateConfiguration>,
) -> Self
pub fn set_template_configuration( self, input: Option<TemplateConfiguration>, ) -> Self
Provides a template for the configuration information to connect to your data source.
Sourcepub fn get_template_configuration(&self) -> &Option<TemplateConfiguration>
pub fn get_template_configuration(&self) -> &Option<TemplateConfiguration>
Provides a template for the configuration information to connect to your data source.
Sourcepub fn build(self) -> DataSourceConfiguration
pub fn build(self) -> DataSourceConfiguration
Consumes the builder and constructs a DataSourceConfiguration
.
Trait Implementations§
Source§impl Clone for DataSourceConfigurationBuilder
impl Clone for DataSourceConfigurationBuilder
Source§fn clone(&self) -> DataSourceConfigurationBuilder
fn clone(&self) -> DataSourceConfigurationBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for DataSourceConfigurationBuilder
impl Default for DataSourceConfigurationBuilder
Source§fn default() -> DataSourceConfigurationBuilder
fn default() -> DataSourceConfigurationBuilder
Source§impl PartialEq for DataSourceConfigurationBuilder
impl PartialEq for DataSourceConfigurationBuilder
Source§fn eq(&self, other: &DataSourceConfigurationBuilder) -> bool
fn eq(&self, other: &DataSourceConfigurationBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for DataSourceConfigurationBuilder
Auto Trait Implementations§
impl Freeze for DataSourceConfigurationBuilder
impl RefUnwindSafe for DataSourceConfigurationBuilder
impl Send for DataSourceConfigurationBuilder
impl Sync for DataSourceConfigurationBuilder
impl Unpin for DataSourceConfigurationBuilder
impl UnwindSafe for DataSourceConfigurationBuilder
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
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>
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);