pub struct ElementHandleJs { /* private fields */ }Expand description
QuickJS-visible wrapper around a core ElementHandle.
Implementations§
Source§impl ElementHandleJs
impl ElementHandleJs
pub const js_is_disposed: __impl_is_disposed = __impl_is_disposed
pub const js_dispose: __impl_dispose = __impl_dispose
pub const js_as_js_handle: __impl_as_js_handle = __impl_as_js_handle
pub const js_evaluate: __impl_evaluate = __impl_evaluate
pub const js_evaluate_handle: __impl_evaluate_handle = __impl_evaluate_handle
pub const js_inner_html: __impl_inner_html = __impl_inner_html
pub const js_inner_text: __impl_inner_text = __impl_inner_text
pub const js_text_content: __impl_text_content = __impl_text_content
pub const js_get_attribute: __impl_get_attribute = __impl_get_attribute
pub const js_input_value: __impl_input_value = __impl_input_value
pub const js_is_visible: __impl_is_visible = __impl_is_visible
pub const js_is_disabled: __impl_is_disabled = __impl_is_disabled
pub const js_is_enabled: __impl_is_enabled = __impl_is_enabled
pub const js_is_checked: __impl_is_checked = __impl_is_checked
pub const js_is_editable: __impl_is_editable = __impl_is_editable
pub const js_bounding_box: __impl_bounding_box = __impl_bounding_box
pub const js_click: __impl_click = __impl_click
pub const js_dblclick: __impl_dblclick = __impl_dblclick
pub const js_hover: __impl_hover = __impl_hover
pub const js_type_str: __impl_type_str = __impl_type_str
pub const js_focus: __impl_focus = __impl_focus
pub const js_scroll_into_view_if_needed: __impl_scroll_into_view_if_needed = __impl_scroll_into_view_if_needed
pub const js_screenshot: __impl_screenshot = __impl_screenshot
pub const js_dollar_eval: __impl_dollar_eval = __impl_dollar_eval
pub const js_dollar_dollar_eval: __impl_dollar_dollar_eval = __impl_dollar_dollar_eval
pub const js_owner_frame: __impl_owner_frame = __impl_owner_frame
pub const js_content_frame: __impl_content_frame = __impl_content_frame
pub const js_wait_for_element_state: __impl_wait_for_element_state = __impl_wait_for_element_state
pub const js_wait_for_selector: __impl_wait_for_selector = __impl_wait_for_selector
pub const js_fill: __impl_fill = __impl_fill
pub const js_check: __impl_check = __impl_check
pub const js_uncheck: __impl_uncheck = __impl_uncheck
pub const js_set_checked: __impl_set_checked = __impl_set_checked
pub const js_tap: __impl_tap = __impl_tap
pub const js_press: __impl_press = __impl_press
pub const js_dispatch_event: __impl_dispatch_event = __impl_dispatch_event
pub const js_select_option: __impl_select_option = __impl_select_option
pub const js_select_text: __impl_select_text = __impl_select_text
pub const js_set_input_files: __impl_set_input_files = __impl_set_input_files
Source§impl ElementHandleJs
impl ElementHandleJs
pub fn new(inner: ElementHandle) -> Self
pub fn inner(&self) -> &ElementHandle
Source§impl ElementHandleJs
impl ElementHandleJs
Sourcepub fn is_disposed(&self) -> bool
pub fn is_disposed(&self) -> bool
Playwright elementHandle.isDisposed(): boolean — METHOD (not a
property). LLM-generated code calls eh.isDisposed() with parens.
Sourcepub fn as_js_handle(&self) -> JSHandleJs
pub fn as_js_handle(&self) -> JSHandleJs
Companion crate::bindings::js_handle::JSHandleJs sharing the
same remote reference. Disposing either releases the remote and
latches both into the disposed state.
Sourcepub async fn evaluate<'js>(
&self,
ctx: Ctx<'js>,
page_function: Value<'js>,
arg: Opt<Value<'js>>,
) -> Result<Value<'js>>
pub async fn evaluate<'js>( &self, ctx: Ctx<'js>, page_function: Value<'js>, arg: Opt<Value<'js>>, ) -> Result<Value<'js>>
Playwright: elementHandle.evaluate(pageFunction, arg?): Promise<R>.
Sourcepub async fn evaluate_handle<'js>(
&self,
ctx: Ctx<'js>,
page_function: Value<'js>,
arg: Opt<Value<'js>>,
) -> Result<JSHandleJs>
pub async fn evaluate_handle<'js>( &self, ctx: Ctx<'js>, page_function: Value<'js>, arg: Opt<Value<'js>>, ) -> Result<JSHandleJs>
Playwright: elementHandle.evaluateHandle(pageFunction, arg?): Promise<JSHandle>.
pub async fn inner_html(&self) -> Result<String>
pub async fn inner_text(&self) -> Result<String>
pub async fn text_content(&self) -> Result<Option<String>>
pub async fn get_attribute(&self, name: String) -> Result<Option<String>>
pub async fn input_value(&self) -> Result<String>
pub async fn is_visible(&self) -> Result<bool>
pub async fn is_disabled(&self) -> Result<bool>
pub async fn is_enabled(&self) -> Result<bool>
pub async fn is_checked(&self) -> Result<bool>
pub async fn is_editable(&self) -> Result<bool>
Sourcepub async fn bounding_box<'js>(&self, ctx: Ctx<'js>) -> Result<Value<'js>>
pub async fn bounding_box<'js>(&self, ctx: Ctx<'js>) -> Result<Value<'js>>
Playwright: elementHandle.boundingBox(). Returns a plain object
{x, y, width, height} or null.
pub async fn click(&self) -> Result<()>
pub async fn dblclick(&self) -> Result<()>
pub async fn hover(&self) -> Result<()>
pub async fn type_str(&self, text: String) -> Result<()>
pub async fn focus(&self) -> Result<()>
pub async fn scroll_into_view_if_needed(&self) -> Result<()>
Sourcepub async fn screenshot<'js>(
&self,
ctx: Ctx<'js>,
options: Opt<Value<'js>>,
) -> Result<Vec<u8>>
pub async fn screenshot<'js>( &self, ctx: Ctx<'js>, options: Opt<Value<'js>>, ) -> Result<Vec<u8>>
Playwright: elementHandle.screenshot(opts?). Today accepts
{ type?: 'png'|'jpeg'|'webp' } via the opts.type field;
additional ScreenshotOpts fields are carried at the core layer
and take effect once the locator-level screenshot gets the full
bag.
Sourcepub async fn dollar_eval<'js>(
&self,
ctx: Ctx<'js>,
selector: String,
page_function: Value<'js>,
arg: Opt<Value<'js>>,
) -> Result<Value<'js>>
pub async fn dollar_eval<'js>( &self, ctx: Ctx<'js>, selector: String, page_function: Value<'js>, arg: Opt<Value<'js>>, ) -> Result<Value<'js>>
Playwright: elementHandle.$eval(selector, pageFunction, arg?)
(/tmp/playwright/packages/playwright-core/src/client/elementHandle.ts:215).
Sourcepub async fn dollar_dollar_eval<'js>(
&self,
ctx: Ctx<'js>,
selector: String,
page_function: Value<'js>,
arg: Opt<Value<'js>>,
) -> Result<Value<'js>>
pub async fn dollar_dollar_eval<'js>( &self, ctx: Ctx<'js>, selector: String, page_function: Value<'js>, arg: Opt<Value<'js>>, ) -> Result<Value<'js>>
Playwright: elementHandle.$$eval(selector, pageFunction, arg?)
(/tmp/playwright/packages/playwright-core/src/client/elementHandle.ts:220).
Sourcepub async fn owner_frame(&self) -> Result<Option<FrameJs>>
pub async fn owner_frame(&self) -> Result<Option<FrameJs>>
Playwright: elementHandle.ownerFrame(): Promise<Frame | null>.
Sourcepub async fn content_frame(&self) -> Result<Option<FrameJs>>
pub async fn content_frame(&self) -> Result<Option<FrameJs>>
Playwright: elementHandle.contentFrame(): Promise<Frame | null>.
Sourcepub async fn wait_for_element_state(
&self,
state: String,
timeout: Opt<f64>,
) -> Result<()>
pub async fn wait_for_element_state( &self, state: String, timeout: Opt<f64>, ) -> Result<()>
Playwright: elementHandle.waitForElementState(state, options?).
Sourcepub async fn wait_for_selector(
&self,
selector: String,
timeout: Opt<f64>,
) -> Result<Option<ElementHandleJs>>
pub async fn wait_for_selector( &self, selector: String, timeout: Opt<f64>, ) -> Result<Option<ElementHandleJs>>
Playwright: elementHandle.waitForSelector(selector, options?).
Sourcepub async fn fill<'js>(
&self,
ctx: Ctx<'js>,
value: String,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn fill<'js>( &self, ctx: Ctx<'js>, value: String, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.fill(value, options?).
Sourcepub async fn check<'js>(
&self,
ctx: Ctx<'js>,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn check<'js>( &self, ctx: Ctx<'js>, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.check(options?).
Sourcepub async fn uncheck<'js>(
&self,
ctx: Ctx<'js>,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn uncheck<'js>( &self, ctx: Ctx<'js>, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.uncheck(options?).
Sourcepub async fn set_checked<'js>(
&self,
ctx: Ctx<'js>,
checked: bool,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn set_checked<'js>( &self, ctx: Ctx<'js>, checked: bool, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.setChecked(checked, options?).
Sourcepub async fn tap<'js>(
&self,
ctx: Ctx<'js>,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn tap<'js>( &self, ctx: Ctx<'js>, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.tap(options?).
Sourcepub async fn press<'js>(
&self,
ctx: Ctx<'js>,
key: String,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn press<'js>( &self, ctx: Ctx<'js>, key: String, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.press(key, options?).
Sourcepub async fn dispatch_event<'js>(
&self,
ctx: Ctx<'js>,
event_type: String,
event_init: Opt<Value<'js>>,
options: Opt<Value<'js>>,
) -> Result<()>
pub async fn dispatch_event<'js>( &self, ctx: Ctx<'js>, event_type: String, event_init: Opt<Value<'js>>, options: Opt<Value<'js>>, ) -> Result<()>
Playwright: elementHandle.dispatchEvent(type, eventInit?).
Sourcepub async fn select_option<'js>(
&self,
ctx: Ctx<'js>,
values: Value<'js>,
options: Opt<Value<'js>>,
) -> Result<Vec<String>>
pub async fn select_option<'js>( &self, ctx: Ctx<'js>, values: Value<'js>, options: Opt<Value<'js>>, ) -> Result<Vec<String>>
Playwright: elementHandle.selectOption(values, options?).
Sourcepub async fn select_text(&self) -> Result<()>
pub async fn select_text(&self) -> Result<()>
Playwright: elementHandle.selectText(options?).
Trait Implementations§
Source§impl<'js> FromJs<'js> for ElementHandleJswhere
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
impl<'js> FromJs<'js> for ElementHandleJswhere
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
Source§impl<'js> IntoJs<'js> for ElementHandleJs
impl<'js> IntoJs<'js> for ElementHandleJs
Source§impl<'js> JsClass<'js> for ElementHandleJs
impl<'js> JsClass<'js> for ElementHandleJs
Source§fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
Source§impl<'js> JsLifetime<'js> for ElementHandleJs
impl<'js> JsLifetime<'js> for ElementHandleJs
Source§type Changed<'to> = ElementHandleJs
type Changed<'to> = ElementHandleJs
Self but with another lifetime 'tSource§impl MethodImplementor<ElementHandleJs> for MethodImpl<ElementHandleJs>
impl MethodImplementor<ElementHandleJs> for MethodImpl<ElementHandleJs>
Auto Trait Implementations§
impl Freeze for ElementHandleJs
impl !RefUnwindSafe for ElementHandleJs
impl Send for ElementHandleJs
impl Sync for ElementHandleJs
impl Unpin for ElementHandleJs
impl UnsafeUnpin for ElementHandleJs
impl !UnwindSafe for ElementHandleJs
Blanket Implementations§
Source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§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);Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.