pub struct JsonTextComponent(pub JsonComponent);Expand description
A VarInt-prefixed JSON representation of the current Java text component schema.
Tuple Fields§
§0: JsonComponentImplementations§
Source§impl JsonTextComponent
impl JsonTextComponent
pub const MAX_DECODE_UTF16_CODE_UNITS: usize = 262_144
pub const MAX_DECODE_BYTES: usize
pub const MAX_DECODE_ENCODED_BYTES: usize
pub const MAX_ENCODE_UTF16_CODE_UNITS: usize = 32_767
pub const MAX_ENCODE_BYTES: usize
pub const MAX_ENCODE_ENCODED_BYTES: usize
pub fn text(value: impl Into<String>) -> Self
pub fn from_json_str(value: &str) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for JsonTextComponent
impl Clone for JsonTextComponent
Source§fn clone(&self) -> JsonTextComponent
fn clone(&self) -> JsonTextComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 JsonTextComponent
impl Debug for JsonTextComponent
Source§impl Default for JsonTextComponent
impl Default for JsonTextComponent
Source§impl From<&str> for JsonTextComponent
impl From<&str> for JsonTextComponent
Source§impl From<Component<Value>> for JsonTextComponent
impl From<Component<Value>> for JsonTextComponent
Source§fn from(value: JsonComponent) -> Self
fn from(value: JsonComponent) -> Self
Converts to this type from the input type.
Source§impl From<String> for JsonTextComponent
impl From<String> for JsonTextComponent
Source§impl PartialEq for JsonTextComponent
impl PartialEq for JsonTextComponent
impl StructuralPartialEq for JsonTextComponent
Auto Trait Implementations§
impl Freeze for JsonTextComponent
impl RefUnwindSafe for JsonTextComponent
impl Send for JsonTextComponent
impl Sync for JsonTextComponent
impl Unpin for JsonTextComponent
impl UnsafeUnpin for JsonTextComponent
impl UnwindSafe for JsonTextComponent
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