Skip to main content

FlattenSerializer

Struct FlattenSerializer 

Source
pub struct FlattenSerializer<'a, R, S> { /* private fields */ }
Expand description

Flattened resources serializer.

Implementations§

Source§

impl<'a, R, S> FlattenSerializer<'a, R, S>

Source

pub fn new(inner: S, resources: &'a mut Vec<R>) -> Self
where R: Clone,

Trait Implementations§

Source§

impl<'a, R: Clone + Ord, S: LinkedDataSerializer<R>> LinkedDataSerializer<R> for FlattenSerializer<'a, R, S>

Source§

type Error = <S as LinkedDataSerializer<R>>::Error

Source§

type Ok = <S as LinkedDataSerializer<R>>::Ok

Source§

fn interpret(&mut self, term: Option<CowTerm<'_>>) -> Result<R, Self::Error>

Source§

fn serialize_resource(&mut self, resource: Option<R>) -> Result<R, Self::Error>

Source§

fn serialize_quad(&mut self, quad: Quad<R>) -> Result<(), Self::Error>

Source§

fn end(self) -> Result<Self::Ok, Self::Error>

Source§

fn as_dyn_mut( &mut self, ) -> &mut dyn LinkedDataSerializer<R, Ok = Self::Ok, Error = Self::Error>
where Self: Sized,

Auto Trait Implementations§

§

impl<'a, R, S> !UnwindSafe for FlattenSerializer<'a, R, S>

§

impl<'a, R, S> Freeze for FlattenSerializer<'a, R, S>
where S: Freeze, &'a mut Vec<R>: Freeze, Vec<R>: Freeze,

§

impl<'a, R, S> RefUnwindSafe for FlattenSerializer<'a, R, S>
where S: RefUnwindSafe, &'a mut Vec<R>: RefUnwindSafe, Vec<R>: RefUnwindSafe,

§

impl<'a, R, S> Send for FlattenSerializer<'a, R, S>
where S: Send, &'a mut Vec<R>: Send, Vec<R>: Send,

§

impl<'a, R, S> Sync for FlattenSerializer<'a, R, S>
where S: Sync, &'a mut Vec<R>: Sync, Vec<R>: Sync,

§

impl<'a, R, S> Unpin for FlattenSerializer<'a, R, S>
where S: Unpin, &'a mut Vec<R>: Unpin, Vec<R>: Unpin,

§

impl<'a, R, S> UnsafeUnpin for FlattenSerializer<'a, R, S>
where S: UnsafeUnpin, &'a mut Vec<R>: UnsafeUnpin, Vec<R>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.