pub struct BorrowedPoFile<'a> {
pub comments: Vec<Cow<'a, str>>,
pub extracted_comments: Vec<Cow<'a, str>>,
pub headers: Vec<BorrowedHeader<'a>>,
pub items: Vec<BorrowedPoItem<'a>>,
}Expand description
Borrowed PO document that reuses slices from the original input whenever possible.
Fields§
§comments: Vec<Cow<'a, str>>File-level translator comments that appear before the header block.
extracted_comments: Vec<Cow<'a, str>>File-level extracted comments that appear before the header block.
headers: Vec<BorrowedHeader<'a>>Parsed header entries from the leading empty msgid block.
items: Vec<BorrowedPoItem<'a>>Regular catalog items in source order.
Implementations§
Source§impl BorrowedPoFile<'_>
impl BorrowedPoFile<'_>
Sourcepub fn into_owned(self) -> PoFile
pub fn into_owned(self) -> PoFile
Converts the borrowed document into the owned PoFile representation.
Trait Implementations§
Source§impl<'a> Clone for BorrowedPoFile<'a>
impl<'a> Clone for BorrowedPoFile<'a>
Source§fn clone(&self) -> BorrowedPoFile<'a>
fn clone(&self) -> BorrowedPoFile<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for BorrowedPoFile<'a>
impl<'a> Debug for BorrowedPoFile<'a>
Source§impl<'a> Default for BorrowedPoFile<'a>
impl<'a> Default for BorrowedPoFile<'a>
Source§fn default() -> BorrowedPoFile<'a>
fn default() -> BorrowedPoFile<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> PartialEq for BorrowedPoFile<'a>
impl<'a> PartialEq for BorrowedPoFile<'a>
impl<'a> Eq for BorrowedPoFile<'a>
impl<'a> StructuralPartialEq for BorrowedPoFile<'a>
Auto Trait Implementations§
impl<'a> Freeze for BorrowedPoFile<'a>
impl<'a> RefUnwindSafe for BorrowedPoFile<'a>
impl<'a> Send for BorrowedPoFile<'a>
impl<'a> Sync for BorrowedPoFile<'a>
impl<'a> Unpin for BorrowedPoFile<'a>
impl<'a> UnsafeUnpin for BorrowedPoFile<'a>
impl<'a> UnwindSafe for BorrowedPoFile<'a>
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