pub enum RuntimeCall {
Show 15 variants
System(CallableCallFor<System, Runtime>),
Timestamp(CallableCallFor<Timestamp, Runtime>),
Grandpa(CallableCallFor<Grandpa, Runtime>),
Balances(CallableCallFor<Balances, Runtime>),
Sudo(CallableCallFor<Sudo, Runtime>),
SessionCommitteeManagement(CallableCallFor<SessionCommitteeManagement, Runtime>),
AddressAssociations(CallableCallFor<AddressAssociations, Runtime>),
BlockProducerFees(CallableCallFor<BlockProducerFees, Runtime>),
BlockProducerMetadata(CallableCallFor<BlockProducerMetadata, Runtime>),
BlockProductionLog(CallableCallFor<BlockProductionLog, Runtime>),
BlockParticipation(CallableCallFor<BlockParticipation, Runtime>),
PalletSession(CallableCallFor<PalletSession, Runtime>),
NativeTokenManagement(CallableCallFor<NativeTokenManagement, Runtime>),
GovernedMap(CallableCallFor<GovernedMap, Runtime>),
TestHelperPallet(CallableCallFor<TestHelperPallet, Runtime>),
}
Expand description
The aggregated runtime call type.
Variants§
System(CallableCallFor<System, Runtime>)
Timestamp(CallableCallFor<Timestamp, Runtime>)
Grandpa(CallableCallFor<Grandpa, Runtime>)
Balances(CallableCallFor<Balances, Runtime>)
Sudo(CallableCallFor<Sudo, Runtime>)
SessionCommitteeManagement(CallableCallFor<SessionCommitteeManagement, Runtime>)
AddressAssociations(CallableCallFor<AddressAssociations, Runtime>)
BlockProducerFees(CallableCallFor<BlockProducerFees, Runtime>)
BlockProducerMetadata(CallableCallFor<BlockProducerMetadata, Runtime>)
BlockProductionLog(CallableCallFor<BlockProductionLog, Runtime>)
BlockParticipation(CallableCallFor<BlockParticipation, Runtime>)
PalletSession(CallableCallFor<PalletSession, Runtime>)
NativeTokenManagement(CallableCallFor<NativeTokenManagement, Runtime>)
GovernedMap(CallableCallFor<GovernedMap, Runtime>)
TestHelperPallet(CallableCallFor<TestHelperPallet, Runtime>)
Trait Implementations§
Source§impl CheckIfFeeless for RuntimeCall
impl CheckIfFeeless for RuntimeCall
Source§fn is_feeless(&self, origin: &Self::Origin) -> bool
fn is_feeless(&self, origin: &Self::Origin) -> bool
#[pallet::feeless_if]
Source§impl Clone for RuntimeCall
impl Clone for RuntimeCall
Source§fn clone(&self) -> RuntimeCall
fn clone(&self) -> RuntimeCall
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RuntimeCall
impl Debug for RuntimeCall
Source§impl Decode for RuntimeCall
impl Decode for RuntimeCall
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl Dispatchable for RuntimeCall
impl Dispatchable for RuntimeCall
Source§type RuntimeOrigin = RuntimeOrigin
type RuntimeOrigin = RuntimeOrigin
Source§type Config = RuntimeCall
type Config = RuntimeCall
Source§type Info = DispatchInfo
type Info = DispatchInfo
Source§type PostInfo = PostDispatchInfo
type PostInfo = PostDispatchInfo
dispatch
. Can be used to supply the caller
with information about a Dispatchable
that is only known post dispatch.Source§fn dispatch(self, origin: RuntimeOrigin) -> DispatchResultWithPostInfo
fn dispatch(self, origin: RuntimeOrigin) -> DispatchResultWithPostInfo
Source§impl Encode for RuntimeCall
impl Encode for RuntimeCall
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<BlockParticipation, Runtime>) -> Self
fn from(call: CallableCallFor<BlockParticipation, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<PalletSession, Runtime>) -> Self
fn from(call: CallableCallFor<PalletSession, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<NativeTokenManagement, Runtime>) -> Self
fn from(call: CallableCallFor<NativeTokenManagement, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<GovernedMap, Runtime>) -> Self
fn from(call: CallableCallFor<GovernedMap, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<SessionCommitteeManagement, Runtime>) -> Self
fn from(call: CallableCallFor<SessionCommitteeManagement, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<AddressAssociations, Runtime>) -> Self
fn from(call: CallableCallFor<AddressAssociations, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<BlockProducerFees, Runtime>) -> Self
fn from(call: CallableCallFor<BlockProducerFees, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<BlockProducerMetadata, Runtime>) -> Self
fn from(call: CallableCallFor<BlockProducerMetadata, Runtime>) -> Self
Source§impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl From<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn from(call: CallableCallFor<BlockProductionLog, Runtime>) -> Self
fn from(call: CallableCallFor<BlockProductionLog, Runtime>) -> Self
Source§impl GetCallMetadata for RuntimeCall
impl GetCallMetadata for RuntimeCall
Source§fn get_call_metadata(&self) -> CallMetadata
fn get_call_metadata(&self) -> CallMetadata
CallMetadata
], containing function and pallet name of the Call.Source§fn get_module_names() -> &'static [&'static str]
fn get_module_names() -> &'static [&'static str]
Source§fn get_call_names(module: &str) -> &'static [&'static str]
fn get_call_names(module: &str) -> &'static [&'static str]
module
.Source§impl GetDispatchInfo for RuntimeCall
impl GetDispatchInfo for RuntimeCall
Source§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
DispatchInfo
, containing relevant information of this dispatch. Read moreSource§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<BlockParticipation, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<BlockParticipation, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<PalletSession, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<PalletSession, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(
&self,
) -> Option<&CallableCallFor<NativeTokenManagement, Runtime>>
fn is_sub_type( &self, ) -> Option<&CallableCallFor<NativeTokenManagement, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<GovernedMap, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<GovernedMap, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(
&self,
) -> Option<&CallableCallFor<SessionCommitteeManagement, Runtime>>
fn is_sub_type( &self, ) -> Option<&CallableCallFor<SessionCommitteeManagement, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<AddressAssociations, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<AddressAssociations, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<BlockProducerFees, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<BlockProducerFees, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(
&self,
) -> Option<&CallableCallFor<BlockProducerMetadata, Runtime>>
fn is_sub_type( &self, ) -> Option<&CallableCallFor<BlockProducerMetadata, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
impl IsSubType<<Pallet<Runtime> as Callable<Runtime>>::RuntimeCall> for RuntimeCall
Source§fn is_sub_type(&self) -> Option<&CallableCallFor<BlockProductionLog, Runtime>>
fn is_sub_type(&self) -> Option<&CallableCallFor<BlockProductionLog, Runtime>>
Some(_)
if self
is an instance of sub type T
.Source§impl PartialEq for RuntimeCall
impl PartialEq for RuntimeCall
Source§impl<__SrApiBlock__: BlockT, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TransactionPaymentCallApi<__SrApiBlock__, u128, RuntimeCall> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
impl<__SrApiBlock__: BlockT, RuntimeApiImplCall: CallApiAt<__SrApiBlock__> + 'static> TransactionPaymentCallApi<__SrApiBlock__, u128, RuntimeCall> for RuntimeApiImpl<__SrApiBlock__, RuntimeApiImplCall>where
RuntimeApiImplCall::StateBackend: StateBackend<HashingFor<__SrApiBlock__>>,
&'static RuntimeApiImplCall: Send,
§fn query_call_info(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
call: Call,
len: u32,
) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
fn query_call_info( &self, __runtime_api_at_param__: <Block as Block>::Hash, call: Call, len: u32, ) -> Result<RuntimeDispatchInfo<Balance>, ApiError>
Call
.§fn query_call_fee_details(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
call: Call,
len: u32,
) -> Result<FeeDetails<Balance>, ApiError>
fn query_call_fee_details( &self, __runtime_api_at_param__: <Block as Block>::Hash, call: Call, len: u32, ) -> Result<FeeDetails<Balance>, ApiError>
Call
.§fn query_weight_to_fee(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
weight: Weight,
) -> Result<Balance, ApiError>
fn query_weight_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, weight: Weight, ) -> Result<Balance, ApiError>
WeightToFee
given some input.§fn query_length_to_fee(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
length: u32,
) -> Result<Balance, ApiError>
fn query_length_to_fee( &self, __runtime_api_at_param__: <Block as Block>::Hash, length: u32, ) -> Result<Balance, ApiError>
LengthToFee
given some input.Source§impl TransactionPaymentCallApiV3<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, u128, RuntimeCall> for Runtime
impl TransactionPaymentCallApiV3<Block<Header<u32, BlakeTwo256>, UncheckedExtrinsic<MultiAddress<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender<Runtime>, CheckSpecVersion<Runtime>, CheckTxVersion<Runtime>, CheckGenesis<Runtime>, CheckMortality<Runtime>, CheckNonce<Runtime>, CheckWeight<Runtime>, ChargeTransactionPayment<Runtime>)>>, u128, RuntimeCall> for Runtime
Source§fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo<Balance>
fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo<Balance>
Call
.Source§fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails<Balance>
fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails<Balance>
Call
.Source§fn query_weight_to_fee(weight: Weight) -> Balance
fn query_weight_to_fee(weight: Weight) -> Balance
WeightToFee
given some input.Source§fn query_length_to_fee(length: u32) -> Balance
fn query_length_to_fee(length: u32) -> Balance
LengthToFee
given some input.Source§impl TypeInfo for RuntimeCall
impl TypeInfo for RuntimeCall
Source§impl UnfilteredDispatchable for RuntimeCall
impl UnfilteredDispatchable for RuntimeCall
Source§type RuntimeOrigin = RuntimeOrigin
type RuntimeOrigin = RuntimeOrigin
frame_system::Config::RuntimeOrigin
).Source§fn dispatch_bypass_filter(
self,
origin: RuntimeOrigin,
) -> DispatchResultWithPostInfo
fn dispatch_bypass_filter( self, origin: RuntimeOrigin, ) -> DispatchResultWithPostInfo
impl DecodeWithMemTracking for RuntimeCall
impl EncodeLike for RuntimeCall
impl Eq for RuntimeCall
impl StructuralPartialEq for RuntimeCall
Auto Trait Implementations§
impl Freeze for RuntimeCall
impl RefUnwindSafe for RuntimeCall
impl Send for RuntimeCall
impl Sync for RuntimeCall
impl Unpin for RuntimeCall
impl UnwindSafe for RuntimeCall
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<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§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();
§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§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();
§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§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();
§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§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();
§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.§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);
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.