Utf16

Struct Utf16 

Source
pub struct Utf16;

Trait Implementations§

Source§

impl ForeignType for Utf16

Source§

fn assignable_from(&self, type_: &Type) -> bool

Is this type assignable from this other type? i.e. let X: ThisType = OtherType;
Source§

fn assignable_to(&self, type_: &Type) -> bool

Is this type assignable to this other type? i.e. let X: OtherType = ThisType; Generally identical to ForeignType::assignable_from
Source§

fn type_ref(&self) -> TokenStream

Emits this type as a Rust type
Source§

fn decoding_gen( &self, source: TokenStream, output_ref: TokenStream, arguments: Vec<TokenStream>, is_async: bool, ) -> TokenStream

output code should be a term expression that: Read more
Source§

fn encoding_gen( &self, target: TokenStream, field_ref: TokenStream, _arguments: Vec<TokenStream>, is_async: bool, ) -> TokenStream

output code should be a single statement that: Read more
Source§

fn arguments(&self) -> Vec<TypeArgument>

All arguments that can be passed to this type to describe characteristics (i.e. string length) All optional arguments must come at the end of the list of arguments.
Source§

fn can_receive_auto(&self) -> Option<ScalarType>

If Some, this type can receive auto defined lengths during encoding
Source§

fn assignable_from_partial(&self, type_: &PartialType) -> bool

An internal modified form of ForeignType::assignable_from to provide some flexibility in type checking.
Source§

fn assignable_to_partial(&self, type_: &PartialType) -> bool

An internal modified form of ForeignType::assignable_to to provide some flexibility in type checking.

Auto Trait Implementations§

§

impl Freeze for Utf16

§

impl RefUnwindSafe for Utf16

§

impl Send for Utf16

§

impl Sync for Utf16

§

impl Unpin for Utf16

§

impl UnwindSafe for Utf16

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.