pub enum Resolvable<S> {
Raw(Arc<RwLock<S>>),
Resolved {
new: Arc<RwLock<S>>,
old: Arc<RwLock<S>>,
},
}
Expand description
Wrapper for schema. This uses Arc<RwLock<S>>
for interior
mutability and differentiates raw schema from resolved schema
(i.e., the one where $ref
references point to the actual schema).
Variants§
Implementations§
source§impl<S> Resolvable<S>where
S: Schema,
impl<S> Resolvable<S>where
S: Schema,
sourcepub fn get_description(&self) -> Option<String>
pub fn get_description(&self) -> Option<String>
Fetch the description for this schema.
Trait Implementations§
source§impl<S> Clone for Resolvable<S>
impl<S> Clone for Resolvable<S>
source§impl<S: Debug> Debug for Resolvable<S>
impl<S: Debug> Debug for Resolvable<S>
source§impl<S: Default> Default for Resolvable<S>
impl<S: Default> Default for Resolvable<S>
source§impl<S> Deref for Resolvable<S>
impl<S> Deref for Resolvable<S>
source§impl<S> DerefMut for Resolvable<S>
impl<S> DerefMut for Resolvable<S>
source§impl<'de, S> Deserialize<'de> for Resolvable<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Resolvable<S>where
S: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<S> From<S> for Resolvable<S>
impl<S> From<S> for Resolvable<S>
Auto Trait Implementations§
impl<S> Freeze for Resolvable<S>
impl<S> RefUnwindSafe for Resolvable<S>
impl<S> Send for Resolvable<S>
impl<S> Sync for Resolvable<S>
impl<S> Unpin for Resolvable<S>
impl<S> UnwindSafe for Resolvable<S>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)