pub struct rustls_slice_str<'a> { /* private fields */ }
Expand description

A read-only view of a slice of multiple Rust &str’s (that is, multiple strings). Like rustls_str, this guarantees that each string contains UTF-8 and no NUL bytes. Strings are not NUL-terminated.

This is used to pass data from rustls-ffi to callback functions provided by the user of the API. Because Vec and slice are not #[repr(C)], we can’t provide a straightforward data and len structure. Instead, we provide access via a pointer to an opaque struct and accessor methods. Internally, the pointee is a &[&str].

The memory exposed is available as specified by the function using this in its signature. For instance, when this is a parameter to a callback, the lifetime will usually be the duration of the callback. Functions that receive one of these must not call its methods beyond the allowed lifetime.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.