Skip to main content

BoundedWString

Struct BoundedWString 

Source
pub struct BoundedWString<const N: u32>;
Expand description

wstring<N>: String of at most N characters.

Trait Implementations§

Source§

impl<const N: u32> Debug for BoundedWString<N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const N: u32> IdlType for BoundedWString<N>

Source§

const MIN_SIZE: usize = 4

The smallest size of a value on the wire, to check the lengths of sequences before reading them.
Source§

type Rust = String

The Rust type of the values.
Source§

type Borrowed = str

What is written: str for strings, a slice for sequences, else Rust itself.
Source§

fn type_code() -> TypeCode

The TypeCode of the type.
Source§

fn write(v: &str, out: &mut OutStream<'_>) -> Sys<()>

Writes a value.
Source§

fn read(input: &mut InStream<'_>) -> Sys<String>

Reads a value.
Source§

fn write_items(items: &[Self::Rust], out: &mut OutStream<'_>) -> Sys<()>

Writes the elements of a sequence or an array.
Source§

fn read_items(len: usize, input: &mut InStream<'_>) -> Sys<Vec<Self::Rust>>

Reads len elements of a sequence or an array.

Auto Trait Implementations§

§

impl<const N: u32> Freeze for BoundedWString<N>

§

impl<const N: u32> RefUnwindSafe for BoundedWString<N>

§

impl<const N: u32> Send for BoundedWString<N>

§

impl<const N: u32> Sync for BoundedWString<N>

§

impl<const N: u32> Unpin for BoundedWString<N>

§

impl<const N: u32> UnsafeUnpin for BoundedWString<N>

§

impl<const N: u32> UnwindSafe for BoundedWString<N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.