Struct ruma_common::canonical_json::RedactedBecause
source · pub struct RedactedBecause(/* private fields */);
Available on crate feature
canonical-json
only.Expand description
The value to put in unsigned.redacted_because
.
Implementations§
source§impl RedactedBecause
impl RedactedBecause
sourcepub fn from_json(obj: CanonicalJsonObject) -> Self
pub fn from_json(obj: CanonicalJsonObject) -> Self
Create a RedactedBecause
from an arbitrary JSON object.
sourcepub fn from_raw_event(ev: &Raw<impl RedactionEvent>) -> Result<Self>
pub fn from_raw_event(ev: &Raw<impl RedactionEvent>) -> Result<Self>
Create a RedactedBecause
from a redaction event.
Fails if the raw event is not valid canonical JSON.
Trait Implementations§
source§impl Clone for RedactedBecause
impl Clone for RedactedBecause
source§fn clone(&self) -> RedactedBecause
fn clone(&self) -> RedactedBecause
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 RefUnwindSafe for RedactedBecause
impl Send for RedactedBecause
impl Sync for RedactedBecause
impl Unpin for RedactedBecause
impl UnwindSafe for RedactedBecause
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