Enum capnp::dynamic_value::Reader

source ·
pub enum Reader<'a> {
Show 19 variants Void, Bool(bool), Int8(i8), Int16(i16), Int32(i32), Int64(i64), UInt8(u8), UInt16(u16), UInt32(u32), UInt64(u64), Float32(f32), Float64(f64), Enum(Enum), Text(Reader<'a>), Data(Reader<'a>), Struct(Reader<'a>), List(Reader<'a>), AnyPointer(Reader<'a>), Capability(Capability),
}
Expand description

A dynamically-typed read-only value.

Variants§

§

Void

§

Bool(bool)

§

Int8(i8)

§

Int16(i16)

§

Int32(i32)

§

Int64(i64)

§

UInt8(u8)

§

UInt16(u16)

§

UInt32(u32)

§

UInt64(u64)

§

Float32(f32)

§

Float64(f64)

§

Enum(Enum)

§

Text(Reader<'a>)

§

Data(Reader<'a>)

§

Struct(Reader<'a>)

§

List(Reader<'a>)

§

AnyPointer(Reader<'a>)

§

Capability(Capability)

Implementations§

source§

impl<'a> Reader<'a>

source

pub fn new(value: Reader<'a>, ty: Type) -> Result<Self>

source

pub fn downcast<T: DowncastReader<'a>>(self) -> T

Downcasts the Reader into a more specific type. Panics if the expected type does not match the value.

Trait Implementations§

source§

impl<'a> Clone for Reader<'a>

source§

fn clone(&self) -> Reader<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for Reader<'a>

source§

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

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

impl<'a> From<&'a [u8]> for Reader<'a>

source§

fn from(d: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Reader<'a>

source§

fn from(t: &'a str) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<()> for Reader<'a>

source§

fn from((): ()) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Capability> for Reader<'a>

source§

fn from(c: Capability) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<ElementSize> for Reader<'a>

source§

fn from(e: ElementSize) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Enum> for Reader<'a>

source§

fn from(e: Enum) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(t: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(t: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(t: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(x: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(a: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(t: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(reader: Reader<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Reader<'a>> for Reader<'a>

source§

fn from(x: Reader<'a>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a, T: TryFrom<u16, Error = NotInSchema> + Introspect> From<Reader<'a, T>> for Reader<'a>

source§

fn from(t: Reader<'a, T>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a, T: OwnedStruct> From<Reader<'a, T>> for Reader<'a>

source§

fn from(t: Reader<'a, T>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a, T: Owned> From<Reader<'a, T>> for Reader<'a>

source§

fn from(t: Reader<'a, T>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a, T: PrimitiveElement + Introspect> From<Reader<'a, T>> for Reader<'a>

source§

fn from(t: Reader<'a, T>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a, T: FromClientHook> From<Reader<'a, T>> for Reader<'a>

source§

fn from(t: Reader<'a, T>) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<bool> for Reader<'a>

source§

fn from(x: bool) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<f32> for Reader<'a>

source§

fn from(x: f32) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<f64> for Reader<'a>

source§

fn from(x: f64) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<i16> for Reader<'a>

source§

fn from(x: i16) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<i32> for Reader<'a>

source§

fn from(x: i32) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<i64> for Reader<'a>

source§

fn from(x: i64) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<i8> for Reader<'a>

source§

fn from(x: i8) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<u16> for Reader<'a>

source§

fn from(x: u16) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<u32> for Reader<'a>

source§

fn from(x: u32) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<u64> for Reader<'a>

source§

fn from(x: u64) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> From<u8> for Reader<'a>

source§

fn from(x: u8) -> Reader<'a>

Converts to this type from the input type.
source§

impl<'a> Copy for Reader<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Reader<'a>

§

impl<'a> !RefUnwindSafe for Reader<'a>

§

impl<'a> !Send for Reader<'a>

§

impl<'a> !Sync for Reader<'a>

§

impl<'a> Unpin for Reader<'a>

§

impl<'a> !UnwindSafe for Reader<'a>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.