DcMstr

Struct DcMstr 

Source
pub struct DcMstr { /* private fields */ }
Expand description

A borrowed slice representing valid DcMixed format data (.dcmm). Analogous to DcStr and Rust’s str.

Implementations§

Source§

impl DcMstr

Source

pub fn from_bytes(bytes: &[u8]) -> Result<&Self, DcMixedError>

Validates the provided byte slice as valid DcMixed and wraps it as a &DcMstr.

§Errors

Returns DcMixedError if the byte slice does not conform to the DcMixed specification.

Source

pub const unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self

Creates a &DcMstr from a byte slice without validation.

§Safety

The caller must ensure that bytes contains valid DcMixed data.

Source

pub fn from_bytes_mut(bytes: &mut [u8]) -> Result<&mut Self, DcMixedError>

Validates the mutable byte slice as valid DcMixed and wraps it as a &mut DcMstr.

§Errors

Returns DcMixedError if the slice does not conform to DcMixed.

Source

pub unsafe fn from_bytes_unchecked_mut(bytes: &mut [u8]) -> &mut Self

Creates a &mut DcMstr without validation.

§Safety

The caller must ensure bytes contains valid DcMixed data.

Source

pub const fn as_bytes(&self) -> &[u8] ⓘ

Returns the underlying byte slice (including the 21-byte header).

Source

pub const fn len(&self) -> usize

Returns the total byte length of the slice (including the 21-byte header).

Source

pub const fn is_empty(&self) -> bool

Returns true if the document has no payload data (only contains the 21-byte header).

Source

pub fn header(&self) -> &[u8] ⓘ

Returns the 21-byte document header (DcMM\0 + UUID).

Source

pub fn payload_bytes(&self) -> &[u8] ⓘ

Returns the slice of payload bytes occurring after the 21-byte header.

Source

pub fn payload_len(&self) -> usize

Returns the length in bytes of the payload after the 21-byte header.

Source

pub fn chunks(&self) -> DcMixedChunks<'_> ⓘ

Returns an iterator yielding DcMixed chunks (text segments and encapsulated payloads).

Source

pub fn to_dc_string(&self) -> Result<DcString>

Converts this DcMstr into a standard DcString (DcUtf) representation.

Binary payloads are converted into base64 characters between Dc 203 and Dc 204, with byte length and any declared type or checksum.

§Errors

Returns error if base64 encoding fails.

Source

pub fn to_dc_string_with_policy( &self, policy: &DcProjectionPolicy, ) -> Result<DcString>

Converts this DcMstr into a standard DcString (DcUtf) representation using the provided crate::DcProjectionPolicy.

Source

pub fn to_dc_string_with_policy_and_resolver( &self, policy: &DcProjectionPolicy, resolver: &dyn SyntaxRuleResolver, ) -> Result<DcString>

Converts this DcMstr into a standard DcString (DcUtf) representation using the provided crate::DcProjectionPolicy and crate::SyntaxRuleResolver.

Source

pub fn to_dc_tokens(&self) -> Result<Vec<u128>>

Converts this DcMstr into a token stream of native u128 character identifiers suitable for syntax parsing and validation.

§Errors

Returns an error if any character or payload cannot be converted.

Source§

impl DcMstr

Source

pub fn decode<T: DcMixedDecode>(&self, policy: &DcProjectionPolicy) -> Result<T>

Interprets the entire string as a typed value without changing source.

§Errors

Returns an error on unsupported syntax, missing fields, or trailing data.

Source

pub fn decode_with_context<T: DcMixedDecode>( &self, context: &SharedValueContext, policy: &DcProjectionPolicy, ) -> Result<T>

Interprets the whole string with explicitly supplied outer bindings.

§Errors

Returns an error if interpretation fails or trailing content remains.

Source

pub fn decode_with_resolver<T: DcMixedDecode>( &self, resolver: &dyn SyntaxRuleResolver, policy: &DcProjectionPolicy, ) -> Result<T>

Interprets the string using a custom SyntaxRuleResolver.

§Errors

Returns an error if interpretation fails or trailing content remains.

Source

pub fn decode_with_resolver_and_context<T: DcMixedDecode>( &self, resolver: &dyn SyntaxRuleResolver, context: Option<&SharedValueContext>, policy: &DcProjectionPolicy, ) -> Result<T>

Interprets the string using a custom SyntaxRuleResolver and optional outer shared context.

§Errors

Returns an error if interpretation fails or trailing content remains.

Source§

impl DcMstr

Source

pub fn inspect<T: DcMixedDecode>(&self) -> DcInspection<'_, T>

Annotates an interpretation, preserving source even when decoding fails.

Source

pub fn inspect_with_policy<'a, T: DcMixedDecode>( &'a self, policy: &DcProjectionPolicy, ) -> DcInspection<'a, T>

Annotates with an explicit projection policy.

Source

pub fn inspect_with_context<'a, T: DcMixedDecode>( &'a self, context: &'a SharedValueContext, ) -> DcInspection<'a, T>

Annotates with explicitly supplied outer reference bindings.

Source

pub fn inspect_with_resolver<'a, T: DcMixedDecode>( &'a self, resolver: &'a dyn SyntaxRuleResolver, ) -> DcInspection<'a, T>

Annotates an interpretation with a custom SyntaxRuleResolver.

Source

pub fn inspect_with_policy_and_resolver<'a, T: DcMixedDecode>( &'a self, policy: &DcProjectionPolicy, resolver: &'a dyn SyntaxRuleResolver, ) -> DcInspection<'a, T>

Annotates an interpretation with an explicit policy and custom SyntaxRuleResolver.

Trait Implementations§

Source§

impl AsRef<[u8]> for DcMstr

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<DcMstr> for DcMstr

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<DcMstr> for DcMstring

Source§

fn as_ref(&self) -> &DcMstr

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<DcMstr> for DcMstring

Source§

fn borrow(&self) -> &DcMstr

Immutably borrows from an owned value. Read more
Source§

impl DcMixedEncode for DcMstr

Source§

fn encode_dc_mixed_to(&self, mst: &mut DcWriter<'_>) -> Result<()>

Serializes a record without a document header. Read more
Source§

fn encode_dc_mixed(&self, mst: &mut DcMstring) -> Result<()>

Source§

fn encode_dc_mixed_with_context( &self, mst: &mut DcMstring, context: &SharedValueContext, ) -> Result<()>

Source§

fn encode_format_elements_with_context( &self, format: DcChar, mst: &mut DcMstring, context: &SharedValueContext, ) -> Result<()>

Source§

fn write_dc_mixed(&self, output: &mut dyn Write) -> Result<()>

Writes a complete DcMM document, including its header.
Source§

fn to_dc_mixed(&self) -> Result<DcMstring>

Encodes a new mixed-mode string, not a preserved source string.
Source§

fn to_dc_string(&self) -> Result<DcString>

Encodes a new DcUtf string, explicitly converting any encapsulations.
Source§

fn encode_dc_mixed_to_with_context( &self, mst: &mut DcWriter<'_>, _context: &SharedValueContext, ) -> Result<()>

Encodes with explicit definitions already persisted by the caller.
Source§

fn encode_format_elements_to_with_context( &self, format: DcChar, mst: &mut DcWriter<'_>, context: &SharedValueContext, ) -> Result<()>

Encodes this value inside a Dc 511 [format] ... Dc 512 format representation container.
Source§

impl DcSource for DcMstr

Source§

type Owned = DcMstring

The corresponding owned string representation.
Source§

fn source_bytes(&self) -> &[u8] ⓘ

Returns the original encoded string, including its format header.
Source§

fn replace_typed_source_field_with_policy_and_resolver( &self, range: Range<usize>, fragment: &DcMstr, policy: &DcProjectionPolicy, resolver: &dyn SyntaxRuleResolver, ) -> Result<DcMstring>

Reconciles a typed replacement with its original source representation using policy and resolver. Read more
Source§

fn replace_source_field( &self, range: Range<usize>, fragment: &DcMstr, ) -> Result<DcMstring>

Splices an encoded field after checking source and fragment boundaries. Read more
Source§

fn replace_typed_source_field( &self, range: Range<usize>, fragment: &DcMstr, ) -> Result<Self::Owned>

Reconciles a typed replacement with its original source representation. Read more
Source§

fn replace_typed_source_field_with_resolver( &self, range: Range<usize>, fragment: &DcMstr, resolver: &dyn SyntaxRuleResolver, ) -> Result<Self::Owned>

Reconciles a typed replacement with its original source representation using resolver. Read more
Source§

impl Debug for DcMstr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DcMstr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&DcMstr> for DcMstring

Source§

fn from(s: &DcMstr) -> Self

Converts to this type from the input type.
Source§

impl Hash for DcMstr

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Index<RangeFull> for DcMstr

Source§

type Output = DcMstr

The returned type after indexing.
Source§

fn index(&self, _: RangeFull) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Ord for DcMstr

Source§

fn cmp(&self, other: &DcMstr) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq<&DcMstr> for DcMstring

Source§

fn eq(&self, other: &&DcMstr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<&str> for DcMstr

Source§

fn eq(&self, other: &&str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<DcMstr> for DcMstring

Source§

fn eq(&self, other: &DcMstr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<DcStr> for DcMstr

Source§

fn eq(&self, other: &DcStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<str> for DcMstr

Source§

fn eq(&self, other: &str) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for DcMstr

Source§

fn eq(&self, other: &DcMstr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for DcMstr

Source§

fn partial_cmp(&self, other: &DcMstr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToOwned for DcMstr

Source§

type Owned = DcMstring

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl Eq for DcMstr

Source§

impl StructuralPartialEq for DcMstr

Auto Trait Implementations§

§

impl Freeze for DcMstr

§

impl RefUnwindSafe for DcMstr

§

impl Send for DcMstr

§

impl !Sized for DcMstr

§

impl Sync for DcMstr

§

impl Unpin for DcMstr

§

impl UnwindSafe for DcMstr

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> Paint for T
where T: ?Sized,

§

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();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
§

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();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

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();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
§

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();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
§

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.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
§

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);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,