ToSchema

Trait ToSchema 

Source
pub trait ToSchema {
    const REQUIRED: bool = true;

    // Required methods
    fn title() -> Cow<'static, str>;
    fn schema(
        schemas: &mut BTreeMap<String, Schema>,
        schemas_in_progress: &mut Vec<String>,
    ) -> Schema;

    // Provided methods
    fn key() -> String { ... }
    fn schema_ref(
        schemas: &mut BTreeMap<String, Schema>,
        schemas_in_progress: &mut Vec<String>,
    ) -> ReferenceOr<Schema> { ... }
    fn schema_ref_box(
        schemas: &mut BTreeMap<String, Schema>,
        schemas_in_progress: &mut Vec<String>,
    ) -> ReferenceOr<Box<Schema>> { ... }
}

Provided Associated Constants§

Source

const REQUIRED: bool = true

Required Methods§

Source

fn title() -> Cow<'static, str>

Source

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Provided Methods§

Source

fn key() -> String

Source

fn schema_ref( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> ReferenceOr<Schema>

Source

fn schema_ref_box( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> ReferenceOr<Box<Schema>>

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.

Implementations on Foreign Types§

Source§

impl ToSchema for IpAddr

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for SocketAddr

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Value

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for bool

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for char

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for f32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for f64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for i8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for i16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for i32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for i64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for i128

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for isize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for str

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for u8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for u16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for u32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for u64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for u128

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for usize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for CString

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for String

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for CStr

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Ipv4Addr

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for Ipv6Addr

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for SocketAddrV4

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for SocketAddrV6

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for AtomicBool

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicI8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicI16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicI32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicI64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicIsize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicU8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicU16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicU32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicU64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for AtomicUsize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Duration

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Path

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for PathBuf

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for SystemTime

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Bytes

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for BytesMut

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Map<String, Value>

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for Number

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for RawValue

Available on crate feature raw_value only.
Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl ToSchema for NonZeroI8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroI16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroI32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroI64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroI128

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroIsize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroU8

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroU16

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroU32

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroU64

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroU128

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl ToSchema for NonZeroUsize

Source§

fn title() -> Cow<'static, str>

Source§

fn schema(_: &mut BTreeMap<String, Schema>, _: &mut Vec<String>) -> Schema

Source§

impl<'a, T> ToSchema for Cow<'a, T>
where T: ToSchema + ?Sized + ToOwned,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<'a, T> ToSchema for &'a T
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<'a, T> ToSchema for &'a mut T
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<K, V> ToSchema for BTreeMap<K, V>
where V: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<K, V, S> ToSchema for HashMap<K, V, S>
where V: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<K, V, S> ToSchema for IndexMap<K, V, S>
where V: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for [T]
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Box<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for BinaryHeap<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for BTreeSet<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for LinkedList<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for VecDeque<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Rc<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Weak<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Arc<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Weak<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Vec<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Cell<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for RefCell<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Reverse<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Wrapping<T>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for Mutex<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T> ToSchema for RwLock<T>
where T: ToSchema + ?Sized,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T, S> ToSchema for HashSet<T, S>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T, S> ToSchema for IndexSet<T, S>
where T: ToSchema,

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T: ToSchema> ToSchema for Option<T>

Source§

const REQUIRED: bool = false

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Source§

impl<T: ToSchema, const N: usize> ToSchema for [T; N]

Source§

fn title() -> Cow<'static, str>

Source§

fn schema( schemas: &mut BTreeMap<String, Schema>, schemas_in_progress: &mut Vec<String>, ) -> Schema

Implementors§