pub struct Code {
pub inner: u32,
}Fields§
§inner: u32Trait Implementations§
Source§impl Error for Code
Available on crate features err_code and err only.
impl Error for Code
Available on crate features
err_code and err only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Message for Code
impl Message for Code
Source§fn descriptor(&self) -> Option<MessageDescriptor>
fn descriptor(&self) -> Option<MessageDescriptor>
Returns the
MessageDescriptor for this message, if this is not a primitive type.Source§fn compute_size(&self) -> usize
fn compute_size(&self) -> usize
Computes the number of bytes a message will take when serialized. This does not
include number of bytes required for tag+wire_format or the bytes used to represent
length of the message in case of LengthDelimited messages/types.
Source§fn serialize<W: PbBufferWriter>(&self, w: &mut W) -> Result<()>
fn serialize<W: PbBufferWriter>(&self, w: &mut W) -> Result<()>
Serializes the message to the writer.
Source§fn deserialize<B: PbBufferReader>(&mut self, buf: &mut B) -> Result<()>
fn deserialize<B: PbBufferReader>(&mut self, buf: &mut B) -> Result<()>
Reads the message from the blob reader, copying as necessary.
Source§fn compute_grpc_slices_size(&self) -> usize
fn compute_grpc_slices_size(&self) -> usize
Computes the number of bytes in all grpc slices.
This information is used to optimize memory allocations in zero-copy encoding.
Source§impl Ord for Code
impl Ord for Code
Source§impl PartialOrd for Code
impl PartialOrd for Code
Source§impl Reflection for Code
impl Reflection for Code
impl Copy for Code
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnwindSafe for Code
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Message for Twhere
T: Message,
impl<T> Message for Twhere
T: Message,
fn erased_descriptor(&self) -> Option<MessageDescriptor>
fn erased_compute_size(&self) -> usize
fn erased_compute_grpc_slices_size(&self) -> usize
fn erased_serialize(&self) -> Vec<u8> ⓘ
fn erased_deserialize(&mut self, r: &[u8]) -> Result<(), Error>
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more