referrerpolicy=no-referrer-when-downgrade
sp_runtime::bounded_vec

Trait TruncateFrom

pub trait TruncateFrom<T> {
    // Required method
    fn truncate_from(unbound: T) -> Self;
}
Expand description

Create an object through truncation.

Required Methods§

fn truncate_from(unbound: T) -> Self

Create an object through truncation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<'a, T, S> TruncateFrom<&'a [T]> for BoundedSlice<'a, T, S>
where S: Get<u32>,

§

impl<T, S> TruncateFrom<Vec<T>> for BoundedVec<T, S>
where S: Get<u32>,