Struct remote_settings_client::client::Record
source · [−]pub struct Record { /* private fields */ }
Implementations
sourceimpl Record
impl Record
pub fn new(value: Value) -> Record
pub fn as_object(&self) -> &Map<String, Value>
pub fn id(&self) -> &str
pub fn last_modified(&self) -> u64
pub fn deleted(&self) -> bool
pub fn get(&self, key: &str) -> Option<&Value>
sourcepub fn attachment_metadata(
&mut self
) -> Result<Option<&AttachmentMetadata>, ClientError>
pub fn attachment_metadata(
&mut self
) -> Result<Option<&AttachmentMetadata>, ClientError>
Return the attachment metadata for this record, if any.
Return values:
Ok(Some(AttachmentMetadata))
- There is an attachment, and it was successfully converted to the expected format.Ok(None)
- There is no attachment for this recordErr(_)
- There is an attachment for this record, but it is not of the expected format.
The AttachmentMetadata::Pending
state should never be returned.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
Blanket Implementations
sourceimpl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
sourceimpl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
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