Struct rustls_ffi::rslice::rustls_slice_bytes[][src]

#[repr(C)]
pub struct rustls_slice_bytes<'a> { pub data: *const u8, pub len: size_t, // some fields omitted }
Expand description

A read-only view on a Rust byte slice.

This is used to pass data from crustls to callback functions provided by the user of the API. len indicates the number of bytes than can be safely read.

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 dereference the data pointer beyond the allowed lifetime.

Fields

data: *const u8len: size_t

Trait Implementations

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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.