pub struct PathSpec {
pub direction: PathDirection,
pub kind: PathKind,
pub allowed_mime_types: Option<Vec<String>>,
pub allowed_extensions: Option<Vec<String>>,
}Fields§
§direction: PathDirection§kind: PathKind§allowed_mime_types: Option<Vec<String>>MIME types allowed for content referenced by this path.
Not enforced by value validation because crate::schema::schema_value::SchemaValue::Path
carries only a path string. Enforce this only in protocol/adaptation
layers that have MIME metadata, such as HTTP Content-Type or a
content-typed envelope. The validator must not read the filesystem
or sniff content.
allowed_extensions: Option<Vec<String>>Trait Implementations§
Source§impl<'de> Deserialize<'de> for PathSpec
impl<'de> Deserialize<'de> for PathSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PathSpec
Source§impl FromSchema for PathSpec
impl FromSchema for PathSpec
fn from_value(value: &SchemaValue) -> Result<PathSpec, FromSchemaError>
Source§impl IntoSchema for PathSpec
impl IntoSchema for PathSpec
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl Serialize for PathSpec
impl Serialize for PathSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PathSpec
Auto Trait Implementations§
impl Freeze for PathSpec
impl RefUnwindSafe for PathSpec
impl Send for PathSpec
impl Sync for PathSpec
impl Unpin for PathSpec
impl UnsafeUnpin for PathSpec
impl UnwindSafe for PathSpec
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