pub struct Value {
pub val: Option<Value_oneof_val>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
}
Fields
val: Option<Value_oneof_val>
unknown_fields: UnknownFields
cached_size: CachedSize
Implementations
sourceimpl Value
impl Value
pub fn new() -> Value
pub fn clear_default_val(&mut self)
pub fn has_default_val(&self) -> bool
pub fn set_default_val(&mut self, v: String)
pub fn mut_default_val(&mut self) -> &mut String
pub fn take_default_val(&mut self) -> String
pub fn get_default_val(&self) -> &str
pub fn clear_bytes_val(&mut self)
pub fn has_bytes_val(&self) -> bool
pub fn set_bytes_val(&mut self, v: Vec<u8>)
pub fn mut_bytes_val(&mut self) -> &mut Vec<u8>
pub fn take_bytes_val(&mut self) -> Vec<u8>
pub fn get_bytes_val(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn clear_int_val(&mut self)
pub fn has_int_val(&self) -> bool
pub fn set_int_val(&mut self, v: i64)
pub fn get_int_val(&self) -> i64
pub fn clear_bool_val(&mut self)
pub fn has_bool_val(&self) -> bool
pub fn set_bool_val(&mut self, v: bool)
pub fn get_bool_val(&self) -> bool
pub fn clear_str_val(&mut self)
pub fn has_str_val(&self) -> bool
pub fn set_str_val(&mut self, v: String)
pub fn mut_str_val(&mut self) -> &mut String
pub fn take_str_val(&mut self) -> String
pub fn get_str_val(&self) -> &str
pub fn clear_double_val(&mut self)
pub fn has_double_val(&self) -> bool
pub fn set_double_val(&mut self, v: f64)
pub fn get_double_val(&self) -> f64
pub fn clear_geo_val(&mut self)
pub fn has_geo_val(&self) -> bool
pub fn set_geo_val(&mut self, v: Vec<u8>)
pub fn mut_geo_val(&mut self) -> &mut Vec<u8>
pub fn take_geo_val(&mut self) -> Vec<u8>
pub fn get_geo_val(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn clear_date_val(&mut self)
pub fn has_date_val(&self) -> bool
pub fn set_date_val(&mut self, v: Vec<u8>)
pub fn mut_date_val(&mut self) -> &mut Vec<u8>
pub fn take_date_val(&mut self) -> Vec<u8>
pub fn get_date_val(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn clear_datetime_val(&mut self)
pub fn has_datetime_val(&self) -> bool
pub fn set_datetime_val(&mut self, v: Vec<u8>)
pub fn mut_datetime_val(&mut self) -> &mut Vec<u8>
pub fn take_datetime_val(&mut self) -> Vec<u8>
pub fn get_datetime_val(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn clear_password_val(&mut self)
pub fn has_password_val(&self) -> bool
pub fn set_password_val(&mut self, v: String)
pub fn mut_password_val(&mut self) -> &mut String
pub fn take_password_val(&mut self) -> String
pub fn get_password_val(&self) -> &str
pub fn clear_uid_val(&mut self)
pub fn has_uid_val(&self) -> bool
pub fn set_uid_val(&mut self, v: u64)
pub fn get_uid_val(&self) -> u64
Trait Implementations
sourceimpl Message for Value
impl Message for Value
sourcefn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
True iff all required fields are initialized.
Always returns
true
for protobuf 3. Read moresourcefn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
Update this message object with fields read from given stream.
sourcefn compute_size(&self) -> u32
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
sourcefn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>
) -> ProtobufResult<()>
fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>
) -> ProtobufResult<()>
Write message to the stream. Read more
sourcefn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by
compute_size
.sourcefn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
sourcefn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
View self as mutable
Any
.sourcefn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
sourcefn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
sourcefn default_instance() -> &'static Value
fn default_instance() -> &'static Value
Return a pointer to default immutable message with static lifetime. Read more
sourcefn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
Write the message to the stream. Read more
sourcefn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>
) -> Result<(), ProtobufError>
fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>
) -> Result<(), ProtobufError>
Write the message to the stream prepending the message with message length
encoded as varint. Read more
sourcefn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8, Global>
) -> Result<(), ProtobufError>
fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8, Global>
) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length
encoded as varint. Read more
sourcefn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
sourcefn check_initialized(&self) -> Result<(), ProtobufError>
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
sourcefn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
Write the message to the writer.
sourcefn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>
fn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>
Write the message to bytes vec.
sourcefn write_to_bytes(&self) -> Result<Vec<u8, Global>, ProtobufError>
fn write_to_bytes(&self) -> Result<Vec<u8, Global>, ProtobufError>
Write the message to bytes vec.
sourcefn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
Write the message to the writer, prepend the message with message length
encoded as varint. Read more
sourcefn write_length_delimited_to_bytes(
&self
) -> Result<Vec<u8, Global>, ProtobufError>
fn write_length_delimited_to_bytes(
&self
) -> Result<Vec<u8, Global>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length
encoded as varint. Read more
sourceimpl ProtobufValue for Value
impl ProtobufValue for Value
sourcefn as_ref(&self) -> ProtobufValueRef<'_>
fn as_ref(&self) -> ProtobufValueRef<'_>
As ref
sourcefn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
sourcefn as_ref_copy(&self) -> ProtobufValueRef<'static>
fn as_ref_copy(&self) -> ProtobufValueRef<'static>
impl StructuralPartialEq for Value
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more