Struct ruma::canonical_json::RedactedBecause
source · pub struct RedactedBecause(/* private fields */);
Expand description
The value to put in unsigned.redacted_because
.
Implementations§
source§impl RedactedBecause
impl RedactedBecause
sourcepub fn from_json(obj: BTreeMap<String, CanonicalJsonValue>) -> RedactedBecause
pub fn from_json(obj: BTreeMap<String, CanonicalJsonValue>) -> RedactedBecause
Create a RedactedBecause
from an arbitrary JSON object.
sourcepub fn from_raw_event(
ev: &Raw<impl RedactionEvent>,
) -> Result<RedactedBecause, Error>
pub fn from_raw_event( ev: &Raw<impl RedactionEvent>, ) -> Result<RedactedBecause, Error>
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 Freeze for RedactedBecause
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)