pub enum BoundValue {
Value(u64),
}Expand description
“optional” keyword is stable in protoc 3.15 but prost is still on 3.14 (see https://github.com/tokio-rs/prost/issues/430 and https://github.com/tokio-rs/prost/pull/455) this syntax is ugly but is binary compatible with the “optional” keyword (see https://stackoverflow.com/questions/42622015/how-to-define-an-optional-field-in-protobuf-3)
Variants
Value(u64)
Implementations
sourceimpl BoundValue
impl BoundValue
pub fn encode<B>(&self, buf: &mut B) where
B: BufMut,
pub fn merge<B>(
field: &mut Option<BoundValue>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
pub fn encoded_len(&self) -> usize
Trait Implementations
sourceimpl Clone for BoundValue
impl Clone for BoundValue
sourcefn clone(&self) -> BoundValue
fn clone(&self) -> BoundValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for BoundValue
impl Debug for BoundValue
sourceimpl PartialEq<BoundValue> for BoundValue
impl PartialEq<BoundValue> for BoundValue
sourcefn eq(&self, other: &BoundValue) -> bool
fn eq(&self, other: &BoundValue) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &BoundValue) -> bool
fn ne(&self, other: &BoundValue) -> bool
This method tests for !=.
impl StructuralPartialEq for BoundValue
Auto Trait Implementations
impl RefUnwindSafe for BoundValue
impl Send for BoundValue
impl Sync for BoundValue
impl Unpin for BoundValue
impl UnwindSafe for BoundValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more