pub struct SchemaBaseConfig<'a> {
pub local_base: Option<&'a Path>,
pub remote_base: Option<&'a str>,
}Expand description
Configuration for mapping schema URLs to local paths.
When both local_base and remote_base are set, URLs starting with
remote_base have that prefix stripped before joining with local_base.
Example:
remote_base:https://ucp.dev/draftlocal_base:source- URL:
https://ucp.dev/draft/schemas/checkout.json - Result:
source/schemas/checkout.json
Fields§
§local_base: Option<&'a Path>Local directory containing schema files.
remote_base: Option<&'a str>URL prefix to strip when mapping to local paths.
Trait Implementations§
Source§impl<'a> Clone for SchemaBaseConfig<'a>
impl<'a> Clone for SchemaBaseConfig<'a>
Source§fn clone(&self) -> SchemaBaseConfig<'a>
fn clone(&self) -> SchemaBaseConfig<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SchemaBaseConfig<'a>
impl<'a> Debug for SchemaBaseConfig<'a>
Source§impl<'a> Default for SchemaBaseConfig<'a>
impl<'a> Default for SchemaBaseConfig<'a>
Source§fn default() -> SchemaBaseConfig<'a>
fn default() -> SchemaBaseConfig<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for SchemaBaseConfig<'a>
impl<'a> RefUnwindSafe for SchemaBaseConfig<'a>
impl<'a> Send for SchemaBaseConfig<'a>
impl<'a> Sync for SchemaBaseConfig<'a>
impl<'a> Unpin for SchemaBaseConfig<'a>
impl<'a> UnsafeUnpin for SchemaBaseConfig<'a>
impl<'a> UnwindSafe for SchemaBaseConfig<'a>
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