[−][src]Struct dsf_core::page::Page
High level description of a database page
Check out PageBuilder
for a helper for constructing Page
objects
Fields
id: Id
application_id: u16
flags: Flags
version: u16
kind: Kind
info: PageInfo
body: Body
issued: DateTime
expiry: Option<DateTime>
public_options: Vec<Options>
private_options: PrivateOptions
previous_sig: Option<Signature>
signature: Option<Signature>
raw: Option<Vec<u8>>
Methods
impl Page
[src]
pub fn new(
id: Id,
application_id: u16,
kind: Kind,
flags: Flags,
version: u16,
info: PageInfo,
body: Body,
issued: SystemTime,
expiry: Option<SystemTime>
) -> Self
[src]
id: Id,
application_id: u16,
kind: Kind,
flags: Flags,
version: u16,
info: PageInfo,
body: Body,
issued: SystemTime,
expiry: Option<SystemTime>
) -> Self
Create a new page
pub fn id(&self) -> &Id
[src]
pub fn application_id(&self) -> u16
[src]
pub fn kind(&self) -> Kind
[src]
pub fn flags(&self) -> Flags
[src]
pub fn version(&self) -> u16
[src]
pub fn info(&self) -> &PageInfo
[src]
pub fn body(&self) -> &Body
[src]
pub fn issued(&self) -> SystemTime
[src]
pub fn expiry(&self) -> Option<SystemTime>
[src]
pub fn public_options(&self) -> &[Options]
[src]
pub fn private_options(&self) -> &PrivateOptions
[src]
pub fn signature(&self) -> Option<Signature>
[src]
pub fn set_signature(&mut self, sig: Signature)
[src]
pub fn raw(&self) -> &Option<Vec<u8>>
[src]
pub fn clean(&mut self)
[src]
impl Page
[src]
pub fn decode_pages<V>(buff: &[u8], key_source: V) -> Result<Vec<Page>, Error> where
V: Fn(&Id) -> Option<PublicKey>,
[src]
V: Fn(&Id) -> Option<PublicKey>,
pub fn encode_pages(pages: &[Page], buff: &mut [u8]) -> Result<usize, Error>
[src]
Trait Implementations
impl<'_> From<&'_ Page> for Base
[src]
impl Clone for Page
[src]
impl PartialEq<Page> for Page
[src]
impl Debug for Page
[src]
impl TryFrom<Base> for Page
[src]
Auto Trait Implementations
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
impl RefUnwindSafe for Page
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,