[][src]Struct ocaml::Str

pub struct Str(_);

OCaml String type

Methods

impl Str[src]

pub fn new(n: Size) -> Str[src]

Create a new string of a given length

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

String length

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

Check if a string is empty

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

Access OCaml string as &str

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

Access OCaml string as &mut str

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

Access OCaml string as &[u8]

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

Access OCaml string as &mut [u8]

Trait Implementations

impl From<Str> for Value[src]

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

impl<'a> From<&'a [u8]> for Str[src]

impl From<Value> for Str[src]

Auto Trait Implementations

impl Send for Str

impl Sync for Str

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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