Struct PartialValidatorKey
#[repr(transparent)]pub struct PartialValidatorKey(pub FixedBytes<15>);Expand description
Partial validator public key encoded inside the nonce key.
Tuple Fields§
§0: FixedBytes<15>Implementations§
§impl PartialValidatorKey
impl PartialValidatorKey
pub const ZERO: PartialValidatorKey
pub const ZERO: PartialValidatorKey
Array of Zero bytes.
pub const fn new(bytes: [u8; 15]) -> PartialValidatorKey
pub const fn new(bytes: [u8; 15]) -> PartialValidatorKey
Wraps the given byte array in this type.
pub const fn with_last_byte(x: u8) -> PartialValidatorKey
pub const fn with_last_byte(x: u8) -> PartialValidatorKey
Creates a new byte array with the last byte set to x.
pub const fn repeat_byte(byte: u8) -> PartialValidatorKey
pub const fn repeat_byte(byte: u8) -> PartialValidatorKey
Creates a new byte array where all bytes are set to byte.
pub fn random() -> PartialValidatorKey
pub fn random() -> PartialValidatorKey
Creates a new fixed byte array with the default cryptographic random number generator.
This is rand::thread_rng if the “rand” and “std” features are enabled, otherwise
it uses getrandom::getrandom. Both are cryptographically secure.
pub fn try_random() -> Result<PartialValidatorKey, Error>
pub fn try_random() -> Result<PartialValidatorKey, Error>
Tries to create a new fixed byte array with the default cryptographic random number generator.
See random for more details.
pub fn randomize(&mut self)
pub fn randomize(&mut self)
Fills this fixed byte array with the default cryptographic random number generator.
See random for more details.
pub fn try_randomize(&mut self) -> Result<(), Error>
pub fn try_randomize(&mut self) -> Result<(), Error>
Tries to fill this fixed byte array with the default cryptographic random number generator.
See random for more details.
pub fn random_with<R>(rng: &mut R) -> PartialValidatorKey
pub fn random_with<R>(rng: &mut R) -> PartialValidatorKey
Creates a new fixed byte array with the given random number generator.
pub fn try_random_with<R>(
rng: &mut R,
) -> Result<PartialValidatorKey, <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
pub fn try_random_with<R>(
rng: &mut R,
) -> Result<PartialValidatorKey, <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
Tries to create a new fixed byte array with the given random number generator.
pub fn randomize_with<R>(&mut self, rng: &mut R)
pub fn randomize_with<R>(&mut self, rng: &mut R)
Fills this fixed byte array with the given random number generator.
pub fn try_randomize_with<R>(
&mut self,
rng: &mut R,
) -> Result<(), <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
pub fn try_randomize_with<R>(
&mut self,
rng: &mut R,
) -> Result<(), <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
Tries to fill this fixed byte array with the given random number generator.
pub fn from_slice(src: &[u8]) -> PartialValidatorKey
pub fn from_slice(src: &[u8]) -> PartialValidatorKey
pub fn left_padding_from(value: &[u8]) -> PartialValidatorKey
pub fn left_padding_from(value: &[u8]) -> PartialValidatorKey
pub fn right_padding_from(value: &[u8]) -> PartialValidatorKey
pub fn right_padding_from(value: &[u8]) -> PartialValidatorKey
pub const fn into_array(self) -> [u8; 15]
pub const fn into_array(self) -> [u8; 15]
Returns the inner bytes array.
pub fn covers(&self, b: &PartialValidatorKey) -> bool
pub fn covers(&self, b: &PartialValidatorKey) -> bool
Returns true if all bits set in b are also set in self.
pub const fn const_eq(&self, other: &PartialValidatorKey) -> bool
pub const fn const_eq(&self, other: &PartialValidatorKey) -> bool
Compile-time equality. NOT constant-time equality.
pub const fn bit_and(self, rhs: PartialValidatorKey) -> PartialValidatorKey
pub const fn bit_and(self, rhs: PartialValidatorKey) -> PartialValidatorKey
Computes the bitwise AND of two FixedBytes.
pub const fn bit_or(self, rhs: PartialValidatorKey) -> PartialValidatorKey
pub const fn bit_or(self, rhs: PartialValidatorKey) -> PartialValidatorKey
Computes the bitwise OR of two FixedBytes.
pub const fn bit_xor(self, rhs: PartialValidatorKey) -> PartialValidatorKey
pub const fn bit_xor(self, rhs: PartialValidatorKey) -> PartialValidatorKey
Computes the bitwise XOR of two FixedBytes.
Methods from Deref<Target = FixedBytes<15>>§
pub const ZERO: FixedBytes<N>
pub fn randomize(&mut self)
Available on crate feature getrandom only.
pub fn randomize(&mut self)
getrandom only.Fills this [FixedBytes] with the default cryptographic random number generator.
See random for more details.
pub fn try_randomize(&mut self) -> Result<(), Error>
Available on crate feature getrandom only.
pub fn try_randomize(&mut self) -> Result<(), Error>
getrandom only.Tries to fill this [FixedBytes] with the default cryptographic random number
generator.
See random for more details.
pub fn randomize_with<R>(&mut self, rng: &mut R)
Available on crate feature rand only.
pub fn randomize_with<R>(&mut self, rng: &mut R)
rand only.Fills this [FixedBytes] with the given random number generator.
pub fn try_randomize_with<R>(
&mut self,
rng: &mut R,
) -> Result<(), <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
Available on crate feature rand only.
pub fn try_randomize_with<R>(
&mut self,
rng: &mut R,
) -> Result<(), <R as TryRngCore>::Error>where
R: TryRngCore + ?Sized,
rand only.Tries to fill this [FixedBytes] with the given random number generator.
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns a mutable slice containing the entire array. Equivalent to
&mut s[..].
pub fn covers(&self, other: &FixedBytes<N>) -> bool
pub fn covers(&self, other: &FixedBytes<N>) -> bool
Returns true if all bits set in self are also set in b.
pub fn const_eq(&self, other: &FixedBytes<N>) -> bool
pub fn const_eq(&self, other: &FixedBytes<N>) -> bool
Compile-time equality. NOT constant-time equality.
pub fn const_is_zero(&self) -> bool
pub fn const_is_zero(&self) -> bool
Returns true if no bits are set.
Methods from Deref<Target = [u8; N]>§
Sourcepub fn as_ascii(&self) -> Option<&[AsciiChar; N]>
🔬This is a nightly-only experimental API. (ascii_char)
pub fn as_ascii(&self) -> Option<&[AsciiChar; N]>
ascii_char)Converts this array of bytes into an array of ASCII characters,
or returns None if any of the characters is non-ASCII.
§Examples
#![feature(ascii_char)]
const HEX_DIGITS: [std::ascii::Char; 16] =
*b"0123456789abcdef".as_ascii().unwrap();
assert_eq!(HEX_DIGITS[1].as_str(), "1");
assert_eq!(HEX_DIGITS[10].as_str(), "a");Sourcepub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]
🔬This is a nightly-only experimental API. (ascii_char)
pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]
ascii_char)Converts this array of bytes into an array of ASCII characters, without checking whether they’re valid.
§Safety
Every byte in the array must be in 0..=127, or else this is UB.
1.57.0 · Sourcepub fn as_slice(&self) -> &[T]
pub fn as_slice(&self) -> &[T]
Returns a slice containing the entire array. Equivalent to &s[..].
1.57.0 · Sourcepub fn as_mut_slice(&mut self) -> &mut [T]
pub fn as_mut_slice(&mut self) -> &mut [T]
Returns a mutable slice containing the entire array. Equivalent to
&mut s[..].
1.77.0 · Sourcepub fn each_ref(&self) -> [&T; N]
pub fn each_ref(&self) -> [&T; N]
Borrows each element and returns an array of references with the same
size as self.
§Example
let floats = [3.1, 2.7, -1.0];
let float_refs: [&f64; 3] = floats.each_ref();
assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);This method is particularly useful if combined with other methods, like
map. This way, you can avoid moving the original
array if its elements are not Copy.
let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()];
let is_ascii = strings.each_ref().map(|s| s.is_ascii());
assert_eq!(is_ascii, [true, false, true]);
// We can still access the original array: it has not been moved.
assert_eq!(strings.len(), 3);1.77.0 · Sourcepub fn each_mut(&mut self) -> [&mut T; N]
pub fn each_mut(&mut self) -> [&mut T; N]
Borrows each element mutably and returns an array of mutable references
with the same size as self.
§Example
let mut floats = [3.1, 2.7, -1.0];
let float_refs: [&mut f64; 3] = floats.each_mut();
*float_refs[0] = 0.0;
assert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);
assert_eq!(floats, [0.0, 2.7, -1.0]);Sourcepub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])
🔬This is a nightly-only experimental API. (split_array)
pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])
split_array)Divides one array reference into two at an index.
The first will contain all indices from [0, M) (excluding
the index M itself) and the second will contain all
indices from [M, N) (excluding the index N itself).
§Panics
Panics if M > N.
§Examples
#![feature(split_array)]
let v = [1, 2, 3, 4, 5, 6];
{
let (left, right) = v.split_array_ref::<0>();
assert_eq!(left, &[]);
assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}
{
let (left, right) = v.split_array_ref::<2>();
assert_eq!(left, &[1, 2]);
assert_eq!(right, &[3, 4, 5, 6]);
}
{
let (left, right) = v.split_array_ref::<6>();
assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
assert_eq!(right, &[]);
}Sourcepub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])
🔬This is a nightly-only experimental API. (split_array)
pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])
split_array)Divides one mutable array reference into two at an index.
The first will contain all indices from [0, M) (excluding
the index M itself) and the second will contain all
indices from [M, N) (excluding the index N itself).
§Panics
Panics if M > N.
§Examples
#![feature(split_array)]
let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.split_array_mut::<2>();
assert_eq!(left, &mut [1, 0][..]);
assert_eq!(right, &mut [3, 0, 5, 6]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);Sourcepub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])
🔬This is a nightly-only experimental API. (split_array)
pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])
split_array)Divides one array reference into two at an index from the end.
The first will contain all indices from [0, N - M) (excluding
the index N - M itself) and the second will contain all
indices from [N - M, N) (excluding the index N itself).
§Panics
Panics if M > N.
§Examples
#![feature(split_array)]
let v = [1, 2, 3, 4, 5, 6];
{
let (left, right) = v.rsplit_array_ref::<0>();
assert_eq!(left, &[1, 2, 3, 4, 5, 6]);
assert_eq!(right, &[]);
}
{
let (left, right) = v.rsplit_array_ref::<2>();
assert_eq!(left, &[1, 2, 3, 4]);
assert_eq!(right, &[5, 6]);
}
{
let (left, right) = v.rsplit_array_ref::<6>();
assert_eq!(left, &[]);
assert_eq!(right, &[1, 2, 3, 4, 5, 6]);
}Sourcepub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])
🔬This is a nightly-only experimental API. (split_array)
pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])
split_array)Divides one mutable array reference into two at an index from the end.
The first will contain all indices from [0, N - M) (excluding
the index N - M itself) and the second will contain all
indices from [N - M, N) (excluding the index N itself).
§Panics
Panics if M > N.
§Examples
#![feature(split_array)]
let mut v = [1, 0, 3, 0, 5, 6];
let (left, right) = v.rsplit_array_mut::<4>();
assert_eq!(left, &mut [1, 0]);
assert_eq!(right, &mut [3, 0, 5, 6][..]);
left[1] = 2;
right[1] = 4;
assert_eq!(v, [1, 2, 3, 4, 5, 6]);Trait Implementations§
§impl<'a> Arbitrary<'a> for PartialValidatorKey
impl<'a> Arbitrary<'a> for PartialValidatorKey
§fn arbitrary(u: &mut Unstructured<'a>) -> Result<PartialValidatorKey, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<PartialValidatorKey, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'a>,
) -> Result<PartialValidatorKey, Error>
fn arbitrary_take_rest( u: Unstructured<'a>, ) -> Result<PartialValidatorKey, Error>
Self from the entirety of the given
unstructured data. Read more§impl Arbitrary for PartialValidatorKey
impl Arbitrary for PartialValidatorKey
§type Parameters = <FixedBytes<15> as Arbitrary>::Parameters
type Parameters = <FixedBytes<15> as Arbitrary>::Parameters
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.§type Strategy = Map<<FixedBytes<15> as Arbitrary>::Strategy, fn(FixedBytes<15>) -> PartialValidatorKey>
type Strategy = Map<<FixedBytes<15> as Arbitrary>::Strategy, fn(FixedBytes<15>) -> PartialValidatorKey>
Strategy used to generate values of type Self.§fn arbitrary() -> <PartialValidatorKey as Arbitrary>::Strategy
fn arbitrary() -> <PartialValidatorKey as Arbitrary>::Strategy
§fn arbitrary_with(
args: <PartialValidatorKey as Arbitrary>::Parameters,
) -> <PartialValidatorKey as Arbitrary>::Strategy
fn arbitrary_with( args: <PartialValidatorKey as Arbitrary>::Parameters, ) -> <PartialValidatorKey as Arbitrary>::Strategy
§impl AsMut<[u8]> for PartialValidatorKey
impl AsMut<[u8]> for PartialValidatorKey
§impl AsMut<[u8; 15]> for PartialValidatorKey
impl AsMut<[u8; 15]> for PartialValidatorKey
§impl AsMut<FixedBytes<15>> for PartialValidatorKey
impl AsMut<FixedBytes<15>> for PartialValidatorKey
§impl AsRef<[u8]> for PartialValidatorKey
impl AsRef<[u8]> for PartialValidatorKey
§impl AsRef<[u8; 15]> for PartialValidatorKey
impl AsRef<[u8; 15]> for PartialValidatorKey
§impl AsRef<FixedBytes<15>> for PartialValidatorKey
impl AsRef<FixedBytes<15>> for PartialValidatorKey
§impl BitAnd<&PartialValidatorKey> for PartialValidatorKey
impl BitAnd<&PartialValidatorKey> for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
& operator.§fn bitand(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
fn bitand(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
& operation. Read more§impl BitAnd for PartialValidatorKey
impl BitAnd for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
& operator.§fn bitand(
self,
__rhs: PartialValidatorKey,
) -> <PartialValidatorKey as BitAnd>::Output
fn bitand( self, __rhs: PartialValidatorKey, ) -> <PartialValidatorKey as BitAnd>::Output
& operation. Read more§impl BitAndAssign<&PartialValidatorKey> for PartialValidatorKey
impl BitAndAssign<&PartialValidatorKey> for PartialValidatorKey
§fn bitand_assign(&mut self, rhs: &PartialValidatorKey)
fn bitand_assign(&mut self, rhs: &PartialValidatorKey)
&= operation. Read more§impl BitAndAssign for PartialValidatorKey
impl BitAndAssign for PartialValidatorKey
§fn bitand_assign(&mut self, __rhs: PartialValidatorKey)
fn bitand_assign(&mut self, __rhs: PartialValidatorKey)
&= operation. Read more§impl BitOr<&PartialValidatorKey> for PartialValidatorKey
impl BitOr<&PartialValidatorKey> for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
| operator.§fn bitor(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
fn bitor(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
| operation. Read more§impl BitOr for PartialValidatorKey
impl BitOr for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
| operator.§fn bitor(
self,
__rhs: PartialValidatorKey,
) -> <PartialValidatorKey as BitOr>::Output
fn bitor( self, __rhs: PartialValidatorKey, ) -> <PartialValidatorKey as BitOr>::Output
| operation. Read more§impl BitOrAssign<&PartialValidatorKey> for PartialValidatorKey
impl BitOrAssign<&PartialValidatorKey> for PartialValidatorKey
§fn bitor_assign(&mut self, rhs: &PartialValidatorKey)
fn bitor_assign(&mut self, rhs: &PartialValidatorKey)
|= operation. Read more§impl BitOrAssign for PartialValidatorKey
impl BitOrAssign for PartialValidatorKey
§fn bitor_assign(&mut self, __rhs: PartialValidatorKey)
fn bitor_assign(&mut self, __rhs: PartialValidatorKey)
|= operation. Read more§impl BitXor<&PartialValidatorKey> for PartialValidatorKey
impl BitXor<&PartialValidatorKey> for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
^ operator.§fn bitxor(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
fn bitxor(self, rhs: &PartialValidatorKey) -> PartialValidatorKey
^ operation. Read more§impl BitXor for PartialValidatorKey
impl BitXor for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
^ operator.§fn bitxor(
self,
__rhs: PartialValidatorKey,
) -> <PartialValidatorKey as BitXor>::Output
fn bitxor( self, __rhs: PartialValidatorKey, ) -> <PartialValidatorKey as BitXor>::Output
^ operation. Read more§impl BitXorAssign<&PartialValidatorKey> for PartialValidatorKey
impl BitXorAssign<&PartialValidatorKey> for PartialValidatorKey
§fn bitxor_assign(&mut self, rhs: &PartialValidatorKey)
fn bitxor_assign(&mut self, rhs: &PartialValidatorKey)
^= operation. Read more§impl BitXorAssign for PartialValidatorKey
impl BitXorAssign for PartialValidatorKey
§fn bitxor_assign(&mut self, __rhs: PartialValidatorKey)
fn bitxor_assign(&mut self, __rhs: PartialValidatorKey)
^= operation. Read more§impl Borrow<[u8]> for &PartialValidatorKey
impl Borrow<[u8]> for &PartialValidatorKey
§impl Borrow<[u8]> for &mut PartialValidatorKey
impl Borrow<[u8]> for &mut PartialValidatorKey
§impl Borrow<[u8]> for PartialValidatorKey
impl Borrow<[u8]> for PartialValidatorKey
§impl Borrow<[u8; 15]> for &PartialValidatorKey
impl Borrow<[u8; 15]> for &PartialValidatorKey
§impl Borrow<[u8; 15]> for &mut PartialValidatorKey
impl Borrow<[u8; 15]> for &mut PartialValidatorKey
§impl Borrow<[u8; 15]> for PartialValidatorKey
impl Borrow<[u8; 15]> for PartialValidatorKey
§impl BorrowMut<[u8]> for &mut PartialValidatorKey
impl BorrowMut<[u8]> for &mut PartialValidatorKey
§fn borrow_mut(&mut self) -> &mut [u8] ⓘ
fn borrow_mut(&mut self) -> &mut [u8] ⓘ
§impl BorrowMut<[u8]> for PartialValidatorKey
impl BorrowMut<[u8]> for PartialValidatorKey
§fn borrow_mut(&mut self) -> &mut [u8] ⓘ
fn borrow_mut(&mut self) -> &mut [u8] ⓘ
§impl BorrowMut<[u8; 15]> for &mut PartialValidatorKey
impl BorrowMut<[u8; 15]> for &mut PartialValidatorKey
§fn borrow_mut(&mut self) -> &mut [u8; 15]
fn borrow_mut(&mut self) -> &mut [u8; 15]
§impl BorrowMut<[u8; 15]> for PartialValidatorKey
impl BorrowMut<[u8; 15]> for PartialValidatorKey
§fn borrow_mut(&mut self) -> &mut [u8; 15]
fn borrow_mut(&mut self) -> &mut [u8; 15]
§impl Clone for PartialValidatorKey
impl Clone for PartialValidatorKey
§fn clone(&self) -> PartialValidatorKey
fn clone(&self) -> PartialValidatorKey
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PartialValidatorKey
impl Debug for PartialValidatorKey
§impl Decodable for PartialValidatorKey
impl Decodable for PartialValidatorKey
§fn decode(buf: &mut &[u8]) -> Result<PartialValidatorKey, Error>
fn decode(buf: &mut &[u8]) -> Result<PartialValidatorKey, Error>
buf must be advanced past
the decoded object.§impl Default for PartialValidatorKey
impl Default for PartialValidatorKey
§fn default() -> PartialValidatorKey
fn default() -> PartialValidatorKey
§impl Deref for PartialValidatorKey
impl Deref for PartialValidatorKey
§impl DerefMut for PartialValidatorKey
impl DerefMut for PartialValidatorKey
§fn deref_mut(&mut self) -> &mut <PartialValidatorKey as Deref>::Target
fn deref_mut(&mut self) -> &mut <PartialValidatorKey as Deref>::Target
§impl<'de> Deserialize<'de> for PartialValidatorKey
impl<'de> Deserialize<'de> for PartialValidatorKey
§fn deserialize<D>(
deserializer: D,
) -> Result<PartialValidatorKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PartialValidatorKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for PartialValidatorKey
impl Display for PartialValidatorKey
§impl Encodable for PartialValidatorKey
impl Encodable for PartialValidatorKey
§impl<'a> From<&'a [u8; 15]> for &'a PartialValidatorKey
impl<'a> From<&'a [u8; 15]> for &'a PartialValidatorKey
§fn from(value: &'a [u8; 15]) -> &'a PartialValidatorKey
fn from(value: &'a [u8; 15]) -> &'a PartialValidatorKey
§impl<'a> From<&'a [u8; 15]> for PartialValidatorKey
impl<'a> From<&'a [u8; 15]> for PartialValidatorKey
§fn from(value: &'a [u8; 15]) -> PartialValidatorKey
fn from(value: &'a [u8; 15]) -> PartialValidatorKey
§impl<'a> From<&'a PartialValidatorKey> for &'a [u8; 15]
impl<'a> From<&'a PartialValidatorKey> for &'a [u8; 15]
§fn from(value: &'a PartialValidatorKey) -> &'a [u8; 15]
fn from(value: &'a PartialValidatorKey) -> &'a [u8; 15]
§impl<'a> From<&'a mut [u8; 15]> for &'a PartialValidatorKey
impl<'a> From<&'a mut [u8; 15]> for &'a PartialValidatorKey
§fn from(value: &'a mut [u8; 15]) -> &'a PartialValidatorKey
fn from(value: &'a mut [u8; 15]) -> &'a PartialValidatorKey
§impl<'a> From<&'a mut [u8; 15]> for &'a mut PartialValidatorKey
impl<'a> From<&'a mut [u8; 15]> for &'a mut PartialValidatorKey
§fn from(value: &'a mut [u8; 15]) -> &'a mut PartialValidatorKey
fn from(value: &'a mut [u8; 15]) -> &'a mut PartialValidatorKey
§impl<'a> From<&'a mut [u8; 15]> for PartialValidatorKey
impl<'a> From<&'a mut [u8; 15]> for PartialValidatorKey
§fn from(value: &'a mut [u8; 15]) -> PartialValidatorKey
fn from(value: &'a mut [u8; 15]) -> PartialValidatorKey
§impl<'a> From<&'a mut PartialValidatorKey> for &'a [u8; 15]
impl<'a> From<&'a mut PartialValidatorKey> for &'a [u8; 15]
§fn from(value: &'a mut PartialValidatorKey) -> &'a [u8; 15]
fn from(value: &'a mut PartialValidatorKey) -> &'a [u8; 15]
§impl<'a> From<&'a mut PartialValidatorKey> for &'a mut [u8; 15]
impl<'a> From<&'a mut PartialValidatorKey> for &'a mut [u8; 15]
§fn from(value: &'a mut PartialValidatorKey) -> &'a mut [u8; 15]
fn from(value: &'a mut PartialValidatorKey) -> &'a mut [u8; 15]
§impl From<[u8; 15]> for PartialValidatorKey
impl From<[u8; 15]> for PartialValidatorKey
§fn from(value: [u8; 15]) -> PartialValidatorKey
fn from(value: [u8; 15]) -> PartialValidatorKey
§impl From<FixedBytes<15>> for PartialValidatorKey
impl From<FixedBytes<15>> for PartialValidatorKey
§fn from(value: FixedBytes<15>) -> PartialValidatorKey
fn from(value: FixedBytes<15>) -> PartialValidatorKey
§impl From<PartialValidatorKey> for [u8; 15]
impl From<PartialValidatorKey> for [u8; 15]
§fn from(value: PartialValidatorKey) -> [u8; 15]
fn from(value: PartialValidatorKey) -> [u8; 15]
§impl From<PartialValidatorKey> for FixedBytes<15>
impl From<PartialValidatorKey> for FixedBytes<15>
§fn from(value: PartialValidatorKey) -> FixedBytes<15>
fn from(value: PartialValidatorKey) -> FixedBytes<15>
§impl FromHex for PartialValidatorKey
impl FromHex for PartialValidatorKey
§fn from_hex<T>(
hex: T,
) -> Result<PartialValidatorKey, <PartialValidatorKey as FromHex>::Error>
fn from_hex<T>( hex: T, ) -> Result<PartialValidatorKey, <PartialValidatorKey as FromHex>::Error>
Self from the given hex string, or fails
with a custom error type. Read more§impl FromStr for PartialValidatorKey
impl FromStr for PartialValidatorKey
§impl Hash for PartialValidatorKey
impl Hash for PartialValidatorKey
§impl<__IdxT> Index<__IdxT> for PartialValidatorKeywhere
FixedBytes<15>: Index<__IdxT>,
impl<__IdxT> Index<__IdxT> for PartialValidatorKeywhere
FixedBytes<15>: Index<__IdxT>,
§impl<__IdxT> IndexMut<__IdxT> for PartialValidatorKeywhere
FixedBytes<15>: IndexMut<__IdxT>,
impl<__IdxT> IndexMut<__IdxT> for PartialValidatorKeywhere
FixedBytes<15>: IndexMut<__IdxT>,
§impl<'__deriveMoreLifetime> IntoIterator for &'__deriveMoreLifetime PartialValidatorKeywhere
&'__deriveMoreLifetime FixedBytes<15>: IntoIterator,
impl<'__deriveMoreLifetime> IntoIterator for &'__deriveMoreLifetime PartialValidatorKeywhere
&'__deriveMoreLifetime FixedBytes<15>: IntoIterator,
§type Item = <&'__deriveMoreLifetime FixedBytes<15> as IntoIterator>::Item
type Item = <&'__deriveMoreLifetime FixedBytes<15> as IntoIterator>::Item
§type IntoIter = <&'__deriveMoreLifetime FixedBytes<15> as IntoIterator>::IntoIter
type IntoIter = <&'__deriveMoreLifetime FixedBytes<15> as IntoIterator>::IntoIter
§fn into_iter(
self,
) -> <&'__deriveMoreLifetime PartialValidatorKey as IntoIterator>::IntoIter
fn into_iter( self, ) -> <&'__deriveMoreLifetime PartialValidatorKey as IntoIterator>::IntoIter
§impl<'__deriveMoreLifetime> IntoIterator for &'__deriveMoreLifetime mut PartialValidatorKeywhere
&'__deriveMoreLifetime mut FixedBytes<15>: IntoIterator,
impl<'__deriveMoreLifetime> IntoIterator for &'__deriveMoreLifetime mut PartialValidatorKeywhere
&'__deriveMoreLifetime mut FixedBytes<15>: IntoIterator,
§type Item = <&'__deriveMoreLifetime mut FixedBytes<15> as IntoIterator>::Item
type Item = <&'__deriveMoreLifetime mut FixedBytes<15> as IntoIterator>::Item
§type IntoIter = <&'__deriveMoreLifetime mut FixedBytes<15> as IntoIterator>::IntoIter
type IntoIter = <&'__deriveMoreLifetime mut FixedBytes<15> as IntoIterator>::IntoIter
§fn into_iter(
self,
) -> <&'__deriveMoreLifetime mut PartialValidatorKey as IntoIterator>::IntoIter
fn into_iter( self, ) -> <&'__deriveMoreLifetime mut PartialValidatorKey as IntoIterator>::IntoIter
§impl IntoIterator for PartialValidatorKeywhere
FixedBytes<15>: IntoIterator,
impl IntoIterator for PartialValidatorKeywhere
FixedBytes<15>: IntoIterator,
§type Item = <FixedBytes<15> as IntoIterator>::Item
type Item = <FixedBytes<15> as IntoIterator>::Item
§type IntoIter = <FixedBytes<15> as IntoIterator>::IntoIter
type IntoIter = <FixedBytes<15> as IntoIterator>::IntoIter
§fn into_iter(self) -> <PartialValidatorKey as IntoIterator>::IntoIter
fn into_iter(self) -> <PartialValidatorKey as IntoIterator>::IntoIter
§impl LowerHex for PartialValidatorKey
impl LowerHex for PartialValidatorKey
§impl MaxEncodedLenAssoc for PartialValidatorKey
impl MaxEncodedLenAssoc for PartialValidatorKey
§impl Not for PartialValidatorKey
impl Not for PartialValidatorKey
§type Output = PartialValidatorKey
type Output = PartialValidatorKey
! operator.§fn not(self) -> PartialValidatorKey
fn not(self) -> PartialValidatorKey
! operation. Read more§impl Ord for PartialValidatorKey
impl Ord for PartialValidatorKey
§fn cmp(&self, other: &PartialValidatorKey) -> Ordering
fn cmp(&self, other: &PartialValidatorKey) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq<&[u8]> for PartialValidatorKey
impl PartialEq<&[u8]> for PartialValidatorKey
§impl PartialEq<&[u8; 15]> for PartialValidatorKey
impl PartialEq<&[u8; 15]> for PartialValidatorKey
§impl PartialEq<&PartialValidatorKey> for [u8]
impl PartialEq<&PartialValidatorKey> for [u8]
§impl PartialEq<&PartialValidatorKey> for [u8; 15]
impl PartialEq<&PartialValidatorKey> for [u8; 15]
§impl PartialEq<[u8]> for &PartialValidatorKey
impl PartialEq<[u8]> for &PartialValidatorKey
§impl PartialEq<[u8]> for PartialValidatorKey
impl PartialEq<[u8]> for PartialValidatorKey
§impl PartialEq<[u8; 15]> for &PartialValidatorKey
impl PartialEq<[u8; 15]> for &PartialValidatorKey
§impl PartialEq<[u8; 15]> for PartialValidatorKey
impl PartialEq<[u8; 15]> for PartialValidatorKey
§impl PartialEq<PartialValidatorKey> for &[u8]
impl PartialEq<PartialValidatorKey> for &[u8]
§impl PartialEq<PartialValidatorKey> for &[u8; 15]
impl PartialEq<PartialValidatorKey> for &[u8; 15]
§impl PartialEq<PartialValidatorKey> for [u8]
impl PartialEq<PartialValidatorKey> for [u8]
§impl PartialEq<PartialValidatorKey> for [u8; 15]
impl PartialEq<PartialValidatorKey> for [u8; 15]
§impl PartialEq for PartialValidatorKey
impl PartialEq for PartialValidatorKey
§impl PartialOrd<&[u8]> for PartialValidatorKey
impl PartialOrd<&[u8]> for PartialValidatorKey
§impl PartialOrd<&PartialValidatorKey> for [u8]
impl PartialOrd<&PartialValidatorKey> for [u8]
§impl PartialOrd<[u8]> for &PartialValidatorKey
impl PartialOrd<[u8]> for &PartialValidatorKey
§impl PartialOrd<[u8]> for PartialValidatorKey
impl PartialOrd<[u8]> for PartialValidatorKey
§impl PartialOrd<PartialValidatorKey> for &[u8]
impl PartialOrd<PartialValidatorKey> for &[u8]
§impl PartialOrd<PartialValidatorKey> for [u8]
impl PartialOrd<PartialValidatorKey> for [u8]
§impl PartialOrd for PartialValidatorKey
impl PartialOrd for PartialValidatorKey
§impl Serialize for PartialValidatorKey
impl Serialize for PartialValidatorKey
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§impl<'a> TryFrom<&'a [u8]> for &'a PartialValidatorKey
impl<'a> TryFrom<&'a [u8]> for &'a PartialValidatorKey
§type Error = TryFromSliceError
type Error = TryFromSliceError
§fn try_from(
slice: &'a [u8],
) -> Result<&'a PartialValidatorKey, <&'a PartialValidatorKey as TryFrom<&'a [u8]>>::Error>
fn try_from( slice: &'a [u8], ) -> Result<&'a PartialValidatorKey, <&'a PartialValidatorKey as TryFrom<&'a [u8]>>::Error>
§impl TryFrom<&[u8]> for PartialValidatorKey
impl TryFrom<&[u8]> for PartialValidatorKey
§type Error = TryFromSliceError
type Error = TryFromSliceError
§fn try_from(
slice: &[u8],
) -> Result<PartialValidatorKey, <PartialValidatorKey as TryFrom<&[u8]>>::Error>
fn try_from( slice: &[u8], ) -> Result<PartialValidatorKey, <PartialValidatorKey as TryFrom<&[u8]>>::Error>
§impl<'a> TryFrom<&'a mut [u8]> for &'a mut PartialValidatorKey
impl<'a> TryFrom<&'a mut [u8]> for &'a mut PartialValidatorKey
§type Error = TryFromSliceError
type Error = TryFromSliceError
§fn try_from(
slice: &'a mut [u8],
) -> Result<&'a mut PartialValidatorKey, <&'a mut PartialValidatorKey as TryFrom<&'a mut [u8]>>::Error>
fn try_from( slice: &'a mut [u8], ) -> Result<&'a mut PartialValidatorKey, <&'a mut PartialValidatorKey as TryFrom<&'a mut [u8]>>::Error>
§impl TryFrom<&mut [u8]> for PartialValidatorKey
impl TryFrom<&mut [u8]> for PartialValidatorKey
§type Error = TryFromSliceError
type Error = TryFromSliceError
§fn try_from(
slice: &mut [u8],
) -> Result<PartialValidatorKey, <PartialValidatorKey as TryFrom<&mut [u8]>>::Error>
fn try_from( slice: &mut [u8], ) -> Result<PartialValidatorKey, <PartialValidatorKey as TryFrom<&mut [u8]>>::Error>
§impl UpperHex for PartialValidatorKey
impl UpperHex for PartialValidatorKey
impl Copy for PartialValidatorKey
impl Eq for PartialValidatorKey
impl MaxEncodedLen<tempo_primitives::::subblock::{impl#100}::{constant#0}> for PartialValidatorKey
impl StructuralPartialEq for PartialValidatorKey
Auto Trait Implementations§
impl Freeze for PartialValidatorKey
impl RefUnwindSafe for PartialValidatorKey
impl Send for PartialValidatorKey
impl Sync for PartialValidatorKey
impl Unpin for PartialValidatorKey
impl UnwindSafe for PartialValidatorKey
Blanket Implementations§
§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<A, T> AsMutBits<T> for A
impl<A, T> AsMutBits<T> for A
§fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
fn as_mut_bits<O>(&mut self) -> &mut BitSlice<T, O> ⓘwhere
O: BitOrder,
self as a mutable bit-slice region with the O ordering.§fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
fn try_as_mut_bits<O>(&mut self) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>where
O: BitOrder,
§impl<T, U> AsMutByteSlice<T> for U
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
§impl<U> AsMutSliceOf for U
impl<U> AsMutSliceOf for U
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where
T: FromByteSlice,
§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
§impl<T> Base32Len for T
impl<T> Base32Len for T
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
§impl<I> BidiIterator for I
impl<I> BidiIterator for I
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§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
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> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv] from a transaction and a sender address.§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
§fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
TxEnv] from a transaction, its sender, and encoded transaction bytes.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IterExt for Twhere
T: IntoIterator,
impl<T> IterExt for Twhere
T: IntoIterator,
§fn merge(self) -> MergeBounded<Self::Item>
fn merge(self) -> MergeBounded<Self::Item>
§fn merge_unbounded(self) -> MergeUnbounded<Self::Item>
fn merge_unbounded(self) -> MergeUnbounded<Self::Item>
§fn join_all(self) -> JoinAll<Self::Item>
fn join_all(self) -> JoinAll<Self::Item>
Vec of their outputs. Read more§fn try_join_all(self) -> TryJoinAll<Self::Item>
fn try_join_all(self) -> TryJoinAll<Self::Item>
Result<Vec<T>, E>. Read more§fn into_unordered_stream(self) -> FuturesUnorderedBounded<Self::Item>
fn into_unordered_stream(self) -> FuturesUnorderedBounded<Self::Item>
§fn into_unordered_stream_unbounded(self) -> FuturesUnordered<Self::Item>
fn into_unordered_stream_unbounded(self) -> FuturesUnordered<Self::Item>
§fn into_ordered_stream(self) -> FuturesOrderedBounded<Self::Item>
fn into_ordered_stream(self) -> FuturesOrderedBounded<Self::Item>
§impl<I> Iterable for I
impl<I> Iterable for I
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§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> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
propagate-header only.§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
add-extension only.§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
map-request-body only.§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
map-response-body only.§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
compression-br or compression-deflate or compression-gzip or compression-zstd only.§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
trace only.§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
trace only.§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
follow-redirect only.§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
sensitive-headers only.§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
sensitive-headers only.§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
sensitive-headers only.§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
set-header only.§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
set-header only.§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
request-id only.§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
request-id only.x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
request-id only.§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
request-id only.x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
catch-panic only.500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
limit only.413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.§impl<T> ToBase32 for T
impl<T> ToBase32 for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more§impl<T> ToHex for T
impl<T> ToHex for T
§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
ToHexExt insteadself into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
ToHexExt insteadself into the result.
Upper case letters are used (e.g. F9B4CA).Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)§impl<T> ToHexExt for T
impl<T> ToHexExt for T
§fn encode_hex(&self) -> String
fn encode_hex(&self) -> String
self into the result.
Lower case letters are used (e.g. f9b4ca).§fn encode_hex_upper(&self) -> String
fn encode_hex_upper(&self) -> String
self into the result.
Upper case letters are used (e.g. F9B4CA).§fn encode_hex_with_prefix(&self) -> String
fn encode_hex_with_prefix(&self) -> String
self into the result with prefix 0x.
Lower case letters are used (e.g. 0xf9b4ca).§fn encode_hex_upper_with_prefix(&self) -> String
fn encode_hex_upper_with_prefix(&self) -> String
self into the result with prefix 0X.
Upper case letters are used (e.g. 0xF9B4CA).§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<A> ArbInterop for A
impl<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> NippyJarHeader for T
impl<T> NumBytes for T
impl<'de, T> RpcBorrow<'de> for T
impl<T> RpcObject for Twhere
T: RpcSend + RpcRecv,
impl<T> RpcRecv for T
impl<T> RpcSend for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 15 bytes