Skip to main content

ValueSlice

Struct ValueSlice 

Source
#[repr(transparent)]
pub struct ValueSlice(pub [ValueAtom]);
Expand description

Borrowed form of Value.

Tuple Fields§

§0: [ValueAtom]

Implementations§

Source§

impl ValueSlice

Source

pub fn is_empty(&self) -> bool

Returns is this value is the empty value (not to be confused with an encoding of zero, which is a non-empty value with a single empty entry).

Trait Implementations§

Source§

impl Borrow<ValueSlice> for Value

Source§

fn borrow(&self) -> &ValueSlice

Immutably borrows from an owned value. Read more
Source§

impl Debug for ValueSlice

Source§

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

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

impl Hash for ValueSlice

Source§

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

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

impl Index<Range<usize>> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

fn index(&self, range: Range<usize>) -> &Self::Output

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

impl Index<RangeFrom<usize>> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

fn index(&self, range: RangeFrom<usize>) -> &Self::Output

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

impl Index<RangeFull> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

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

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

impl Index<RangeInclusive<usize>> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

fn index(&self, range: RangeInclusive<usize>) -> &Self::Output

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

impl Index<RangeTo<usize>> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

fn index(&self, range: RangeTo<usize>) -> &Self::Output

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

impl Index<RangeToInclusive<usize>> for ValueSlice

Source§

type Output = ValueSlice

The returned type after indexing.
Source§

fn index(&self, range: RangeToInclusive<usize>) -> &Self::Output

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

impl Ord for ValueSlice

Source§

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

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

impl PartialEq for ValueSlice

Source§

fn eq(&self, other: &ValueSlice) -> 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 ValueSlice

Source§

fn partial_cmp(&self, other: &ValueSlice) -> 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 Serialize for ValueSlice

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToOwned for ValueSlice

Source§

type Owned = Value

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Value

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 TryFrom<&ValueSlice> for ()

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<(), InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<A, B, C, D, E, F, G, H, I, J, K> TryFrom<&ValueSlice> for (A, B, C, D, E, F, G, H, I, J, K)
where A: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, B: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, C: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, D: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, E: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<B, C, D, E, F, G, H, I, J, K> TryFrom<&ValueSlice> for (B, C, D, E, F, G, H, I, J, K)
where B: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, C: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, D: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, E: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<C, D, E, F, G, H, I, J, K> TryFrom<&ValueSlice> for (C, D, E, F, G, H, I, J, K)
where C: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, D: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, E: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<D, E, F, G, H, I, J, K> TryFrom<&ValueSlice> for (D, E, F, G, H, I, J, K)
where D: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, E: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<E, F, G, H, I, J, K> TryFrom<&ValueSlice> for (E, F, G, H, I, J, K)
where E: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<F, G, H, I, J, K> TryFrom<&ValueSlice> for (F, G, H, I, J, K)
where F: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<G, H, I, J, K> TryFrom<&ValueSlice> for (G, H, I, J, K)
where G: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<H, I, J, K> TryFrom<&ValueSlice> for (H, I, J, K)
where H: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<I, J, K> TryFrom<&ValueSlice> for (I, J, K)
where I: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<J, K> TryFrom<&ValueSlice> for (J, K)
where J: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>, K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl<K> TryFrom<&ValueSlice> for (K,)
where K: Aligned + for<'a> TryFrom<&'a ValueSlice, Error = InvalidBuiltinDecode>,

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(val: &ValueSlice) -> Result<Self, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for HashOutput

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<HashOutput, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for Vec<u8>

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<Vec<u8>, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for bool

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<bool, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for u128

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<u128, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for u16

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<u16, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for u32

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<u32, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for u64

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<u64, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl TryFrom<&ValueSlice> for u8

Source§

type Error = InvalidBuiltinDecode

The type returned in the event of a conversion error.
Source§

fn try_from(value: &ValueSlice) -> Result<u8, InvalidBuiltinDecode>

Performs the conversion.
Source§

impl Eq for ValueSlice

Source§

impl StructuralPartialEq for ValueSlice

Auto Trait Implementations§

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
Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

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

Source§

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
Source§

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