[−][src]Struct solana_libra_vm::vm_string::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.
fn serialize(&self, serializer: &mut impl CanonicalSerializer) -> Result<()>
[src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for VMStr
[src]
fn cmp(&self, other: &VMStr) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<VMStr> for VMStr
[src]
impl PartialOrd<VMStr> for VMStr
[src]
fn partial_cmp(&self, other: &VMStr) -> Option<Ordering>
[src]
fn lt(&self, other: &VMStr) -> bool
[src]
fn le(&self, other: &VMStr) -> bool
[src]
fn gt(&self, other: &VMStr) -> bool
[src]
fn ge(&self, other: &VMStr) -> bool
[src]
impl StructuralEq for VMStr
[src]
impl StructuralPartialEq for VMStr
[src]
impl ToOwned for VMStr
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,