Struct rustdoc::html::render::ordered_json::OrderedJson
source · pub(crate) struct OrderedJson(String);
Expand description
Prerendered json.
Both the Display and serde_json::to_string implementations write the serialized json
Tuple Fields§
§0: String
Implementations§
source§impl OrderedJson
impl OrderedJson
sourcepub(crate) fn serialize<T: Serialize>(item: T) -> Result<Self, Error>
pub(crate) fn serialize<T: Serialize>(item: T) -> Result<Self, Error>
If you pass in an array, it will not be sorted.
sourcepub(crate) fn array_sorted<T: Borrow<Self>, I: IntoIterator<Item = T>>(
items: I,
) -> Self
pub(crate) fn array_sorted<T: Borrow<Self>, I: IntoIterator<Item = T>>( items: I, ) -> Self
Serializes and sorts
pub(crate) fn array_unsorted<T: Borrow<Self>, I: IntoIterator<Item = T>>( items: I, ) -> Self
Trait Implementations§
source§impl Clone for OrderedJson
impl Clone for OrderedJson
source§fn clone(&self) -> OrderedJson
fn clone(&self) -> OrderedJson
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 moresource§impl Debug for OrderedJson
impl Debug for OrderedJson
source§impl<'de> Deserialize<'de> for OrderedJson
impl<'de> Deserialize<'de> for OrderedJson
source§fn 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
source§impl Display for OrderedJson
impl Display for OrderedJson
source§impl From<OrderedJson> for EscapedJson
impl From<OrderedJson> for EscapedJson
source§fn from(json: OrderedJson) -> Self
fn from(json: OrderedJson) -> Self
Converts to this type from the input type.
source§impl From<OrderedJson> for Value
impl From<OrderedJson> for Value
source§fn from(json: OrderedJson) -> Self
fn from(json: OrderedJson) -> Self
Converts to this type from the input type.
source§impl From<Value> for OrderedJson
impl From<Value> for OrderedJson
source§impl Ord for OrderedJson
impl Ord for OrderedJson
source§fn cmp(&self, other: &OrderedJson) -> Ordering
fn cmp(&self, other: &OrderedJson) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for OrderedJson
impl PartialEq for OrderedJson
source§impl PartialOrd for OrderedJson
impl PartialOrd for OrderedJson
source§impl Serialize for OrderedJson
impl Serialize for OrderedJson
impl Eq for OrderedJson
impl StructuralPartialEq for OrderedJson
Auto Trait Implementations§
impl Freeze for OrderedJson
impl RefUnwindSafe for OrderedJson
impl Send for OrderedJson
impl Sync for OrderedJson
impl Unpin for OrderedJson
impl UnwindSafe for OrderedJson
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
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 moresource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes