Struct Nitf

Source
pub struct Nitf {
    pub nitf_header: NitfHeader,
    pub image_segments: Vec<ImageSegment>,
    pub graphic_segments: Vec<GraphicSegment>,
    pub text_segments: Vec<TextSegment>,
    pub data_extension_segments: Vec<DataExtensionSegment>,
    pub reserved_extension_segments: Vec<ReservedExtensionSegment>,
}
Expand description

Top level NITF interface

Fields§

§nitf_header: NitfHeader

Nitf file header.

§image_segments: Vec<ImageSegment>

Vector of image segments.

§graphic_segments: Vec<GraphicSegment>

Vector of graphics segments.

§text_segments: Vec<TextSegment>

Vector of text segments.

§data_extension_segments: Vec<DataExtensionSegment>

Vector of data extension segments.

§reserved_extension_segments: Vec<ReservedExtensionSegment>

Vector of reserved extension segments.

Implementations§

Source§

impl Nitf

Source

pub fn from_reader(reader: &mut (impl Read + Seek)) -> NitfResult<Self>

Construct a Nitf from a reader

Source

pub fn write_headers( &mut self, writer: &mut (impl Write + Seek), ) -> NitfResult<usize>

Write the header information for all segments to a file

Source

pub fn length(&self) -> usize

Get the length of the Nitf file in bytes

Source

pub fn add_im(&mut self, seg: ImageSegment)

Add a ImageSegment to the object.

Takes ownership of the segment to indicate that the metadata should not be extensively modified after adding. Some fields can be changed without adverse affect, but it should be done with moderate prejudice.

Source

pub fn add_sy(&mut self, seg: GraphicSegment)

Add a GraphicSegment to the object.

Takes ownership of the segment to indicate that the metadata should not be extensively modified after adding. Some fields can be changed without adverse affect, but it should be done with moderate prejudice.

Source

pub fn add_te(&mut self, seg: TextSegment)

Add a TextSegment to the object.

Takes ownership of the segment to indicate that the metadata should not be extensively modified after adding. Some fields can be changed without adverse affect, but it should be done with moderate prejudice.

Source

pub fn add_de(&mut self, seg: DataExtensionSegment)

Add a DataExtensionSegment to the object.

Takes ownership of the segment to indicate that the metadata should not be extensively modified after adding. Some fields can be changed without adverse affect, but it should be done with moderate prejudice.

Source

pub fn add_re(&mut self, seg: ReservedExtensionSegment)

Add a ReservedExtensionSegment to the object.

Takes ownership of the segment to indicate that the metadata should not be extensively modified after adding. Some fields can be changed without adverse affect, but it should be done with moderate prejudice.

Trait Implementations§

Source§

impl Debug for Nitf

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Nitf

Source§

fn default() -> Nitf

Returns the “default value” for a type. Read more
Source§

impl Display for Nitf

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Nitf

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Nitf

Auto Trait Implementations§

§

impl Freeze for Nitf

§

impl RefUnwindSafe for Nitf

§

impl Send for Nitf

§

impl Sync for Nitf

§

impl Unpin for Nitf

§

impl UnwindSafe for Nitf

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.