Trait zenoh_keyexpr::key_expr::format::IKeFormatStorage

source ·
pub trait IKeFormatStorage<'s>: Sized {
    type PartialConstruct;
    type ConstructionError: Display;
    type ValuesStorage<T>: AsMut<[T]> + AsRef<[T]>;

    // Required methods
    fn new_constructor(    ) -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>;
    fn add_segment(
        constructor: IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>,
        segment: Segment<'s>,
    ) -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>;
    fn segments(&self) -> &[Segment<'s>];
    fn segments_mut(&mut self) -> &mut [Segment<'s>];
    fn values_storage<T, F: FnMut(usize) -> T>(
        &self,
        f: F,
    ) -> Self::ValuesStorage<T>;

    // Provided methods
    fn segment(&self, id: &str) -> Option<&Segment<'s>> { ... }
    fn segment_mut(&mut self, id: &str) -> Option<&mut Segment<'s>> { ... }
}

Required Associated Types§

Required Methods§

source

fn new_constructor() -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source

fn add_segment( constructor: IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>, segment: Segment<'s>, ) -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source

fn segments(&self) -> &[Segment<'s>]

source

fn segments_mut(&mut self) -> &mut [Segment<'s>]

source

fn values_storage<T, F: FnMut(usize) -> T>( &self, f: F, ) -> Self::ValuesStorage<T>

Provided Methods§

source

fn segment(&self, id: &str) -> Option<&Segment<'s>>

source

fn segment_mut(&mut self, id: &str) -> Option<&mut Segment<'s>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'s> IKeFormatStorage<'s> for Vec<Segment<'s>>

source§

type PartialConstruct = Infallible

source§

type ConstructionError = Infallible

source§

type ValuesStorage<T> = Box<[T]>

source§

fn new_constructor() -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source§

fn add_segment( constructor: IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>, segment: Segment<'s>, ) -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source§

fn segments(&self) -> &[Segment<'s>]

source§

fn segments_mut(&mut self) -> &mut [Segment<'s>]

source§

fn values_storage<T, F: FnMut(usize) -> T>( &self, f: F, ) -> Self::ValuesStorage<T>

source§

impl<'s, const N: usize> IKeFormatStorage<'s> for [Segment<'s>; N]

source§

type PartialConstruct = ([MaybeUninit<Segment<'s>>; N], u16)

source§

type ConstructionError = Box<dyn Error + Send + Sync>

source§

type ValuesStorage<T> = [T; N]

source§

fn new_constructor() -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source§

fn add_segment( constructor: IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>, segment: Segment<'s>, ) -> IterativeConstructor<Self, Self::PartialConstruct, Self::ConstructionError>

source§

fn segments(&self) -> &[Segment<'s>]

source§

fn segments_mut(&mut self) -> &mut [Segment<'s>]

source§

fn values_storage<T, F: FnMut(usize) -> T>( &self, f: F, ) -> Self::ValuesStorage<T>

Implementors§