pub enum SetFieldError {
NotFound,
InvalidType {
field: FieldDescriptor,
value: Box<Value>,
},
}Available on crate feature
dynamic only.Expand description
Reasons super::DynamicMessage::try_set_field (and friends) can fail.
Variants§
NotFound
The named field / number does not exist on the descriptor.
InvalidType
The supplied value’s runtime shape did not match the field.
Fields
§
field: FieldDescriptorThe field that rejected the assignment.
Trait Implementations§
Source§impl Clone for SetFieldError
impl Clone for SetFieldError
Source§fn clone(&self) -> SetFieldError
fn clone(&self) -> SetFieldError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SetFieldError
impl Debug for SetFieldError
Source§impl Display for SetFieldError
impl Display for SetFieldError
Source§impl Error for SetFieldError
impl Error for SetFieldError
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 PartialEq for SetFieldError
impl PartialEq for SetFieldError
impl StructuralPartialEq for SetFieldError
Auto Trait Implementations§
impl Freeze for SetFieldError
impl RefUnwindSafe for SetFieldError
impl Send for SetFieldError
impl Sync for SetFieldError
impl Unpin for SetFieldError
impl UnsafeUnpin for SetFieldError
impl UnwindSafe for SetFieldError
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