Skip to main content

AsBStrOpt

Trait AsBStrOpt 

Source
pub trait AsBStrOpt {
    // Required method
    fn as_bstr_opt(&self) -> Option<&BStr>;
}
Available on crate feature bstr only.
Expand description

Provide an optional borrowed byte-string view of common string and byte containers.

Required Methods§

Source

fn as_bstr_opt(&self) -> Option<&BStr>

Return this value as a borrowed byte string, or None if it is absent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsBStrOpt for Option<&BStr>

Implementors§

Source§

impl<T: AsBStr + ?Sized> AsBStrOpt for T