Trait allsorts_no_std::binary::write::WriteBinary[][src]

pub trait WriteBinary<HostType = Self> {
    type Output;
    fn write<C: WriteContext>(
        ctxt: &mut C,
        val: HostType
    ) -> Result<Self::Output, WriteError>; }

Trait that describes a type that can be written to a WriteContext in binary form.

Associated Types

type Output[src]

The type of the value returned by write.

Loading content...

Required methods

fn write<C: WriteContext>(
    ctxt: &mut C,
    val: HostType
) -> Result<Self::Output, WriteError>
[src]

Write the binary representation of Self to ctxt.

Loading content...

Implementors

impl WriteBinary<&'_ Operand> for Operand[src]

type Output = ()

impl WriteBinary<&'_ Header> for allsorts_no_std::cff::Header[src]

type Output = ()

impl WriteBinary<&'_ TableRecord> for TableRecord[src]

type Output = ()

impl WriteBinary<Operator> for Operator[src]

impl WriteBinary<IndexToLocFormat> for IndexToLocFormat[src]

type Output = ()

impl WriteBinary<SequentialMapGroup> for SequentialMapGroup[src]

type Output = ()

impl WriteBinary<F2Dot14> for F2Dot14[src]

type Output = ()

impl<'a> WriteBinary<&'_ CustomCharset<'a>> for CustomCharset<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ CustomEncoding<'a>> for CustomEncoding<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ FDSelect<'a>> for FDSelect<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ MaybeOwnedIndex<'a>> for MaybeOwnedIndex<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ CmapSubtable<'a>> for allsorts_no_std::tables::cmap::CmapSubtable<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ CFF<'a>> for CFF<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ CIDData<'a>> for CIDData<'a>[src]

type Output = CIDDataOffsets

impl<'a> WriteBinary<&'_ Index<'a>> for Index<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ Type1Data<'a>> for Type1Data<'a>[src]

type Output = Type1DataOffsets

impl<'a> WriteBinary<&'_ Header> for allsorts_no_std::post::Header[src]

type Output = ()

impl<'a> WriteBinary<&'_ PascalString<'a>> for PascalString<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ PostTable<'a>> for PostTable<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ SubTable<'a>> for SubTable<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ HeadTable> for HeadTable[src]

type Output = Placeholder<U32Be, u32>

fn write<C: WriteContext>(
    ctxt: &mut C,
    table: &HeadTable
) -> Result<Self::Output, WriteError>
[src]

Writes the table to the WriteContext and returns a placeholder to the check_sum_adjustment field.

The check_sum_adjustment field requires special handling to calculate. See: https://docs.microsoft.com/en-us/typography/opentype/spec/head

impl<'a> WriteBinary<&'_ HheaTable> for HheaTable[src]

type Output = ()

impl<'a> WriteBinary<&'_ HmtxTable<'a>> for HmtxTable<'a>[src]

type Output = ()

impl<'a> WriteBinary<&'_ MaxpTable> for MaxpTable[src]

type Output = ()

impl<'a> WriteBinary<&'_ MaxpVersion1SubTable> for MaxpVersion1SubTable[src]

type Output = ()

impl<'a> WriteBinary<&'_ NameTable<'a>> for NameTable<'a>[src]

type Output = ()

impl<'a> WriteBinary<CmapSubtable> for allsorts_no_std::tables::cmap::owned::CmapSubtable[src]

type Output = ()

impl<'a> WriteBinary<CompositeGlyphArgument> for CompositeGlyphArgument[src]

type Output = ()

impl<'a> WriteBinary<CompositeGlyphScale> for CompositeGlyphScale[src]

type Output = ()

impl<'a> WriteBinary<ReadScope<'a>> for ReadScope<'a>[src]

type Output = ()

impl<'a> WriteBinary<Range<u8, u8>> for Range<u8, u8>[src]

type Output = ()

impl<'a> WriteBinary<Range<u16, u8>> for Range<u16, u8>[src]

type Output = ()

impl<'a> WriteBinary<Range<u16, u16>> for Range<u16, u16>[src]

type Output = ()

impl<'a> WriteBinary<Cmap> for Cmap[src]

type Output = ()

impl<'a> WriteBinary<BoundingBox> for BoundingBox[src]

type Output = ()

impl<'a> WriteBinary<CompositeGlyph> for CompositeGlyph[src]

type Output = ()

impl<'a> WriteBinary<Glyph<'a>> for Glyph<'a>[src]

type Output = ()

impl<'a> WriteBinary<SimpleGlyph> for SimpleGlyph[src]

type Output = ()

impl<'a> WriteBinary<LocaTable<'a>> for LocaTable<'a>[src]

type Output = ()

impl<'a> WriteBinary<LangTagRecord> for LangTagRecord[src]

type Output = ()

impl<'a> WriteBinary<LongHorMetric> for LongHorMetric[src]

type Output = ()

impl<'a> WriteBinary<NameRecord> for NameRecord[src]

type Output = ()

impl<'a, T> WriteBinary<&'_ ReadArrayCow<'a, T>> for ReadArrayCow<'a, T> where
    T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>,
    T::HostType: Copy
[src]

type Output = ()

impl<'a, T> WriteBinary<&'_ ReadArray<'a, T>> for &ReadArray<'a, T> where
    T: ReadUnchecked<'a> + WriteBinary<<T as ReadUnchecked<'a>>::HostType>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for I8 where
    T: Into<i8>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for I16Be where
    T: Into<i16>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for I32Be where
    T: Into<i32>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for I64Be where
    T: Into<i64>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for U8 where
    T: Into<u8>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for U16Be where
    T: Into<u16>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for U24Be where
    T: Into<u32>, 
[src]

type Output = ()

impl<T> WriteBinary<T> for U32Be where
    T: Into<u32>, 
[src]

type Output = ()

Loading content...