DcMixedDecode

Trait DcMixedDecode 

Source
pub trait DcMixedDecode: Sized {
    // Required method
    fn decode_dc_node(
        ctx: &mut DcProjectionContext<'_, '_>,
        node_id: NodeId,
    ) -> Result<Self>;

    // Provided method
    fn decode_dc_document(
        ctx: &mut DcProjectionContext<'_, '_>,
        roots: &[NodeId],
    ) -> Result<(Self, usize)> { ... }
}
Expand description

Trait for types that can be projected from a parsed NodeId in a DcSyntaxArena.

Required Methods§

Source

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Projects an instance from the given syntax node_id under ctx.

§Errors

Returns an error if unexpected characters, malformed data, or missing required fields are encountered and ctx.policy specifies an error action.

Provided Methods§

Source

fn decode_dc_document( ctx: &mut DcProjectionContext<'_, '_>, roots: &[NodeId], ) -> Result<(Self, usize)>

Projects a document and returns the number of roots consumed.

Node projection must remain local; only this entrypoint may use a document’s root sequence. The caller reports any remaining roots.

§Errors

Returns an error if the document is empty or projection fails.

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 DcMixedDecode for IpAddr

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for bool

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for i8

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for i16

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for i32

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for i64

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for i128

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for isize

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for u8

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for u16

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for u32

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for u64

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for u128

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for ()

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for usize

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for String

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for Ipv4Addr

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for Ipv6Addr

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for Duration

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for PathBuf

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for SystemTime

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl DcMixedDecode for FormatId

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<A: DcMixedDecode, B: DcMixedDecode> DcMixedDecode for (A, B)

Source§

fn decode_dc_document( ctx: &mut DcProjectionContext<'_, '_>, roots: &[NodeId], ) -> Result<(Self, usize)>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<K, V> DcMixedDecode for BTreeMap<K, V>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode> DcMixedDecode for (T0,)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode> DcMixedDecode for (T0, T1, T2)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode, T7: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode, T7: DcMixedDecode, T8: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode, T7: DcMixedDecode, T8: DcMixedDecode, T9: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode, T7: DcMixedDecode, T8: DcMixedDecode, T9: DcMixedDecode, T10: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T0: DcMixedDecode, T1: DcMixedDecode, T2: DcMixedDecode, T3: DcMixedDecode, T4: DcMixedDecode, T5: DcMixedDecode, T6: DcMixedDecode, T7: DcMixedDecode, T8: DcMixedDecode, T9: DcMixedDecode, T10: DcMixedDecode, T11: DcMixedDecode> DcMixedDecode for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T: DcMixedDecode> DcMixedDecode for Option<T>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T: DcMixedDecode> DcMixedDecode for Box<T>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T: DcMixedDecode> DcMixedDecode for Arc<T>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

impl<T: DcMixedDecode> DcMixedDecode for Vec<T>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Source§

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

Source§

fn decode_dc_document( ctx: &mut DcProjectionContext<'_, '_>, roots: &[NodeId], ) -> Result<(Self, usize)>

Source§

fn decode_dc_node( ctx: &mut DcProjectionContext<'_, '_>, node_id: NodeId, ) -> Result<Self>

Implementors§