pub struct AlpnBuilder<Target> { /* private fields */ }
Expand description
A builder for Alpn
value content.
Implementations§
source§impl<Target> AlpnBuilder<Target>
impl<Target> AlpnBuilder<Target>
sourcepub fn empty() -> Selfwhere
Target: EmptyBuilder,
pub fn empty() -> Selfwhere Target: EmptyBuilder,
Creates a new, empty ALPN value builder.
sourcepub fn push(&mut self, protocol: impl AsRef<[u8]>) -> Result<(), BuildAlpnError>where
Target: OctetsBuilder + AsRef<[u8]>,
pub fn push(&mut self, protocol: impl AsRef<[u8]>) -> Result<(), BuildAlpnError>where Target: OctetsBuilder + AsRef<[u8]>,
Appends the given protocol name to the builder.
Returns an error if the name is too long or the ALPN value would become too long or the underlying octets builder runs out of space.
sourcepub fn freeze(self) -> Alpn<Target::Octets>where
Target: FreezeBuilder,
pub fn freeze(self) -> Alpn<Target::Octets>where Target: FreezeBuilder,
Converts the builder into an imutable ALPN value.
Trait Implementations§
source§impl<Target: Clone> Clone for AlpnBuilder<Target>
impl<Target: Clone> Clone for AlpnBuilder<Target>
source§fn clone(&self) -> AlpnBuilder<Target>
fn clone(&self) -> AlpnBuilder<Target>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<Target> RefUnwindSafe for AlpnBuilder<Target>where Target: RefUnwindSafe,
impl<Target> Send for AlpnBuilder<Target>where Target: Send,
impl<Target> Sync for AlpnBuilder<Target>where Target: Sync,
impl<Target> Unpin for AlpnBuilder<Target>where Target: Unpin,
impl<Target> UnwindSafe for AlpnBuilder<Target>where Target: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere Self::Error: Into<Infallible>,
Performs an infallible conversion.