freight_car_forwarder 0.1.11

Port of the C++ port of Timothy O'Connor's Freight Car Forwarding system.
Documentation
// -!- rust -!- //////////////////////////////////////////////////////////////
//
//  System        : 
//  Module        : 
//  Object Name   : $RCSfile$
//  Revision      : $Revision$
//  Date          : $Date$
//  Author        : $Author$
//  Created By    : Robert Heller
//  Created       : 2025-09-02 15:11:01
//  Last Modified : <250919.1110>
//
//  Description	
//
//  Notes
//
//  History
//	
/////////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2025  Robert Heller D/B/A Deepwoods Software
//			51 Locke Hill Road
//			Wendell, MA 01379-9728
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program; if not, write to the Free Software
//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// 
//
//////////////////////////////////////////////////////////////////////////////

/// Owner struct
#[derive(Debug, Default, Clone)]
pub struct Owner {
    initials: String,
    name: String,
    comment: String,
}

impl Owner {
    /// Initialize a new Owner struct
    /// ## Parameters:
    /// - initials the owner inirials
    /// - name the owner name
    /// - comment a comment
    ///
    /// __Returns__ a freshly initialized Owner struct.
    pub fn new(initials: String, name: String, comment: String) -> Self {
        Self {initials: initials, name: name, comment: comment}
    }
    /// The owner initials
    /// ## Parameters:
    /// None
    ///
    /// __Returns__ the owner initials
    pub fn Initials(&self) -> String {self.initials.clone()}
    /// The owner name
    /// ## Parameters:
    /// None
    ///
    /// __Returns__ the owner name
    pub fn Name(&self) -> String {self.name.clone()}
    /// The owner comment
    /// ## Parameters:
    /// None
    ///
    /// __Returns__ the owner comment
    pub fn Comment(&self) -> String {self.comment.clone()}
}

use std::fmt;

impl fmt::Display for Owner {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.name)
    }
}