pub struct IteratorArray<'i, I, M = ()>(/* private fields */);Expand description
Implements SchemaSerialize for an iterator by serializing the elements into a sequence.
A value of this type should only be serialized one. Serializing multiple times will result in an error.
Implementations§
Source§impl<I> IteratorArray<'_, I>
impl<I> IteratorArray<'_, I>
Source§impl<I, M> IteratorArray<'_, I, M>
impl<I, M> IteratorArray<'_, I, M>
pub fn with_mapper(iter: I, mapper: M) -> Self
Source§impl<'i, T> IteratorArray<'i, Box<dyn Iterator<Item = T> + 'i>>
impl<'i, T> IteratorArray<'i, Box<dyn Iterator<Item = T> + 'i>>
pub fn boxed(iter: impl IntoIterator<Item = T> + 'i) -> Self
Trait Implementations§
Source§impl<'i, I, M> SchemaSerialize for IteratorArray<'i, I, M>
impl<'i, I, M> SchemaSerialize for IteratorArray<'i, I, M>
Source§fn schema_serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn schema_serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serializes an object of this type. Read more
Source§fn is_present(&self) -> bool
fn is_present(&self) -> bool
Determines whether a property of this type should be serialized within a JSON object. Read more
Source§impl<'i, I, M> ToSchema for IteratorArray<'i, I, M>
impl<'i, I, M> ToSchema for IteratorArray<'i, I, M>
Source§const REQUIRED: bool = true
const REQUIRED: bool = true
Determines whether a property of this type may be omitted. Read more
Source§const ALWAYS_INLINED: bool = <[M::Original] as ToSchema>::ALWAYS_INLINED
const ALWAYS_INLINED: bool = <[M::Original] as ToSchema>::ALWAYS_INLINED
Indicates whether
self.schema_ref(registry) == self.schema(registry).Source§type Original = <[<M as IteratorItemMapper<<I as Iterator>::Item>>::Original] as ToSchema>::Original
type Original = <[<M as IteratorItemMapper<<I as Iterator>::Item>>::Original] as ToSchema>::Original
A type with a schema that allows the same values as this type. Read more
Source§fn name() -> Cow<'static, str>
fn name() -> Cow<'static, str>
Returns the name to use for adding this schema to the OpenAPI
components section.Auto Trait Implementations§
impl<'i, I, M = ()> !Freeze for IteratorArray<'i, I, M>
impl<'i, I, M = ()> !RefUnwindSafe for IteratorArray<'i, I, M>
impl<'i, I, M> Send for IteratorArray<'i, I, M>
impl<'i, I, M = ()> !Sync for IteratorArray<'i, I, M>
impl<'i, I, M> Unpin for IteratorArray<'i, I, M>
impl<'i, I, M> UnsafeUnpin for IteratorArray<'i, I, M>where
M: UnsafeUnpin,
I: UnsafeUnpin,
impl<'i, I, M> UnwindSafe for IteratorArray<'i, I, M>where
M: UnwindSafe,
I: 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