[−][src]Struct ocaml::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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,