Trait protobuf::reflect::ProtobufValue [−][src]
pub trait ProtobufValue: Any + Clone + Default + Debug + Send + Sync + Sized + 'static {
type RuntimeType: RuntimeType<Value = Self>;
fn runtime_type_box() -> RuntimeTypeBox { ... }
fn as_ref(value: &Self) -> ReflectValueRef<'_> { ... }
fn as_mut(value: &mut Self) -> ReflectValueMut<'_> { ... }
fn from_value_box(
value_box: ReflectValueBox
) -> Result<Self, ReflectValueBox> { ... }
fn set_from_value_box(target: &mut Self, value_box: ReflectValueBox) { ... }
fn default_value_ref() -> ReflectValueRef<'static> { ... }
fn into_static_value_ref(value: Self) -> ReflectValueRef<'static> { ... }
fn is_non_zero(value: &Self) -> bool { ... }
}
Expand description
Type implemented by all protobuf singular types (primitives, string, messages, enums).
Used in reflection.
Associated Types
type RuntimeType: RuntimeType<Value = Self>
type RuntimeType: RuntimeType<Value = Self>
Actual implementation of type properties.
Provided methods
fn runtime_type_box() -> RuntimeTypeBox
fn runtime_type_box() -> RuntimeTypeBox
Dynamic version of the type.
fn as_ref(value: &Self) -> ReflectValueRef<'_>
fn as_ref(value: &Self) -> ReflectValueRef<'_>
Pointer to a dynamic reference.
Mutable pointer to a dynamic mutable reference.
fn from_value_box(value_box: ReflectValueBox) -> Result<Self, ReflectValueBox>
fn from_value_box(value_box: ReflectValueBox) -> Result<Self, ReflectValueBox>
fn set_from_value_box(target: &mut Self, value_box: ReflectValueBox)
fn set_from_value_box(target: &mut Self, value_box: ReflectValueBox)
Write the value.
fn default_value_ref() -> ReflectValueRef<'static>
fn default_value_ref() -> ReflectValueRef<'static>
Default value for this type.
fn into_static_value_ref(value: Self) -> ReflectValueRef<'static>
fn into_static_value_ref(value: Self) -> ReflectValueRef<'static>
fn is_non_zero(value: &Self) -> bool
fn is_non_zero(value: &Self) -> bool
Value is non-default?