Struct ruma::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: BTreeMap<String, CanonicalJsonValue>) -> RedactedBecause
Available on crate feature events
only.
pub fn from_json(obj: BTreeMap<String, CanonicalJsonValue>) -> RedactedBecause
events
only.Create a RedactedBecause
from an arbitrary JSON object.
sourcepub fn from_raw_event(
ev: &Raw<impl RedactionEvent>,
) -> Result<RedactedBecause, Error>
Available on crate feature events
only.
pub fn from_raw_event( ev: &Raw<impl RedactionEvent>, ) -> Result<RedactedBecause, Error>
events
only.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§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