[][src]Struct solana_libra_vm::vm_string::VMStr

#[repr(transparent)]pub struct VMStr(_);

A borrowed string in Move code.

For more details, see the module level documentation.

Methods

impl VMStr[src]

pub fn new<'a>(s: impl AsRef<str> + 'a) -> &'a VMStr[src]

pub fn len(&self) -> usize[src]

Returns the length of self in bytes.

pub fn is_empty(&self) -> bool[src]

Returns true if self has a length of zero bytes.

pub fn as_str(&self) -> &str[src]

Converts self to a &str.

This is not implemented as a From trait to discourage automatic conversions -- these conversions should not typically happen.

pub fn as_bytes(&self) -> &[u8][src]

Converts self to a byte slice.

Trait Implementations

impl AsRef<VMStr> for VMString[src]

impl Borrow<VMStr> for VMString[src]

impl CanonicalSerialize for VMStr[src]

LCS does not define any sort of extra annotation for VM strings -- they're serialized exactly the same way regular strings are, and are represented only within the type system for now.

impl Debug for VMStr[src]

impl Display for VMStr[src]

impl Eq for VMStr[src]

impl<'a> From<&'a VMStr> for VMString[src]

impl<'a> From<&'a str> for &'a VMStr[src]

impl Hash for VMStr[src]

impl Ord for VMStr[src]

impl PartialEq<VMStr> for VMStr[src]

impl PartialOrd<VMStr> for VMStr[src]

impl StructuralEq for VMStr[src]

impl StructuralPartialEq for VMStr[src]

impl ToOwned for VMStr[src]

type Owned = VMString

The resulting type after obtaining ownership.

Auto Trait Implementations

impl RefUnwindSafe for VMStr

impl Send for VMStr

impl Sync for VMStr

impl Unpin for VMStr

impl UnwindSafe for VMStr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]