Struct Value

Source
#[repr(C)]
pub struct Value<'a> { /* private fields */ }

Implementations§

Source§

impl Value<'_>

Source

pub fn kind(&self) -> ValueKind

Source§

impl<'a> Value<'a>

Source

pub fn runtime_type(&self) -> Type<'a>

Source§

impl Value<'_>

Source

pub fn is_bool(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_true(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_false(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_bytes(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_double(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_duration(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_error(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_int(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_list(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_map(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_message(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_null(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_opaque(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_optional(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_string(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_struct(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_timestamp(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_type(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_uint(&self) -> bool

Source§

impl Value<'_>

Source

pub fn is_unknown(&self) -> bool

Source§

impl<'a> Value<'a>

Source

pub fn swap(self: Pin<&mut Self>, other: Pin<&mut Self>)

Source

pub fn new_bool(value: &BoolValue) -> UniquePtr<Self>

Source

pub fn new_bytes(bytes: &BytesValue<'a>) -> UniquePtr<Self>

Source

pub fn new_double(value: &DoubleValue) -> UniquePtr<Self>

Source

pub fn new_duration(value: &DurationValue) -> UniquePtr<Self>

Source

pub fn new_error(value: &ErrorValue<'a>) -> UniquePtr<Self>

Source

pub fn new_int(value: &IntValue) -> UniquePtr<Self>

Source

pub fn new_list(list: &ListValue<'a>) -> UniquePtr<Self>

Source

pub fn new_map(map: &MapValue<'a>) -> UniquePtr<Self>

Source

pub fn new_message(message: &MessageValue<'a>) -> UniquePtr<Self>

Source

pub fn new_null() -> UniquePtr<Self>

Source

pub fn new_opaque(opaque: &OpaqueValue<'a>) -> UniquePtr<Self>

Source

pub fn new_optional(optional: &OptionalValue<'a>) -> UniquePtr<Self>

Source

pub fn new_string(string: &StringValue<'a>) -> UniquePtr<Self>

Source

pub fn new_timestamp(timestamp: &TimestampValue) -> UniquePtr<Self>

Source

pub fn new_type(type_value: &TypeValue<'a>) -> UniquePtr<Self>

Source

pub fn new_uint(uint: &UintValue) -> UniquePtr<Self>

Source

pub fn get_bool(&self) -> UniquePtr<BoolValue>

Source

pub fn get_bytes(&self) -> UniquePtr<BytesValue<'a>>

Source

pub fn get_double(&self) -> UniquePtr<DoubleValue>

Source

pub fn get_duration(&self) -> UniquePtr<DurationValue>

Source

pub fn get_error(&self) -> UniquePtr<ErrorValue<'a>>

Source

pub fn get_int(&self) -> UniquePtr<IntValue>

Source

pub fn get_list(&self) -> UniquePtr<ListValue<'a>>

Source

pub fn get_map(&self) -> UniquePtr<MapValue<'a>>

Source

pub fn get_message(&self) -> UniquePtr<MessageValue<'a>>

Source

pub fn get_null(&self) -> UniquePtr<NullValue>

Source

pub fn get_opaque(&self) -> UniquePtr<OpaqueValue<'a>>

Source

pub fn get_optional(&self) -> UniquePtr<OptionalValue<'a>>

Source

pub fn get_string(&self) -> UniquePtr<StringValue<'a>>

Source

pub fn get_timestamp(&self) -> UniquePtr<TimestampValue>

Source

pub fn get_type(&self) -> UniquePtr<TypeValue<'a>>

Source

pub fn get_uint(&self) -> UniquePtr<UintValue>

Trait Implementations§

Source§

impl<'a> ExternType for Value<'a>

Source§

type Kind = Opaque

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

impl<'a> SizedExternType for Value<'a>

Source§

impl<'a> SpanElement for Value<'a>

Source§

type TypeId = (r, u, s, t, (), c, e, l, __, c, x, x, (), S, p, a, n, __, V, a, l, u, e)

Source§

impl<'a> Send for Value<'a>

Source§

impl<'a> Sync for Value<'a>

Source§

impl<'a> UniquePtrTarget for Value<'a>

Auto Trait Implementations§

§

impl<'a> !Freeze for Value<'a>

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> !Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.