Struct ruma::push::FlattenedJson
source · pub struct FlattenedJson { /* private fields */ }
Expand description
The flattened representation of a JSON object.
Implementations§
source§impl FlattenedJson
impl FlattenedJson
sourcepub fn from_raw<T>(raw: &Raw<T>) -> FlattenedJson
Available on crate feature events
only.
pub fn from_raw<T>(raw: &Raw<T>) -> FlattenedJson
events
only.Create a FlattenedJson
from Raw
.
sourcepub fn get(&self, path: &str) -> Option<&FlattenedJsonValue>
Available on crate feature events
only.
pub fn get(&self, path: &str) -> Option<&FlattenedJsonValue>
events
only.Get the value associated with the given path
.
sourcepub fn get_str(&self, path: &str) -> Option<&str>
Available on crate feature events
only.
pub fn get_str(&self, path: &str) -> Option<&str>
events
only.Get the value associated with the given path
, if it is a string.
sourcepub fn contains_mentions(&self) -> bool
Available on crate feature events
only.
pub fn contains_mentions(&self) -> bool
events
only.Whether this flattened JSON contains an m.mentions
property under the content
property.
Trait Implementations§
source§impl Clone for FlattenedJson
impl Clone for FlattenedJson
source§fn clone(&self) -> FlattenedJson
fn clone(&self) -> FlattenedJson
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FlattenedJson
impl RefUnwindSafe for FlattenedJson
impl Send for FlattenedJson
impl Sync for FlattenedJson
impl Unpin for FlattenedJson
impl UnwindSafe for FlattenedJson
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
)source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more