[−][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 ToValue for Str
[src]
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 Unpin for Str
impl Sync for Str
impl UnwindSafe for Str
impl RefUnwindSafe for Str
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,