Struct relay_protocol::Meta
source · pub struct Meta(/* private fields */);
Expand description
Meta information for a data field in the event payload.
Implementations§
source§impl Meta
impl Meta
sourcepub fn from_error<E: Into<Error>>(err: E) -> Self
pub fn from_error<E: Into<Error>>(err: E) -> Self
From an error
sourcepub fn original_length(&self) -> Option<usize>
pub fn original_length(&self) -> Option<usize>
The original length of this field, if applicable.
sourcepub fn set_original_length(&mut self, original_length: Option<usize>)
pub fn set_original_length(&mut self, original_length: Option<usize>)
Updates the original length of this annotation.
sourcepub fn iter_remarks(&self) -> impl Iterator<Item = &Remark>
pub fn iter_remarks(&self) -> impl Iterator<Item = &Remark>
Iterates all remarks on this field.
sourcepub fn clear_remarks(&mut self)
pub fn clear_remarks(&mut self)
Clears all remarks
sourcepub fn add_remark(&mut self, remark: Remark)
pub fn add_remark(&mut self, remark: Remark)
Adds a remark.
sourcepub fn iter_errors(&self) -> impl Iterator<Item = &Error>
pub fn iter_errors(&self) -> impl Iterator<Item = &Error>
Iterates errors on this field.
sourcepub fn original_value(&self) -> Option<&Value>
pub fn original_value(&self) -> Option<&Value>
Returns a reference to the original value, if any.
sourcepub fn original_value_as_mut(&mut self) -> Option<&mut Value>
pub fn original_value_as_mut(&mut self) -> Option<&mut Value>
Returns a mutable reference to the original value, if any.
sourcepub fn set_original_value<T>(&mut self, original_value: Option<T>)where
T: IntoValue,
pub fn set_original_value<T>(&mut self, original_value: Option<T>)where
T: IntoValue,
Sets the original value.
sourcepub fn take_original_value(&mut self) -> Option<Value>
pub fn take_original_value(&mut self) -> Option<Value>
Take out the original value.
sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Indicates whether this field has errors.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Meta
impl<'de> Deserialize<'de> for Meta
source§fn deserialize<D>(deserializer: D) -> Result<Meta, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Meta, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnwindSafe for Meta
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)